Fun with Bar Charts

As Sheldon Cooper would say, this is the first episode of "Fun with Charts".  I did not find a cool term like "Vexillology" and "Cartography" is taken by map making, so let us go with "Chartology". Yesterday, I saw a couple of interesting bar charts as shown on the right.  I thought […]

Post a Comment

Legend Order in SGPLOT Procedure

This article is by guest contributor Lelia McConnell, SAS Tech Support. Several users have called recently to ask the question, “Can I reorder the legend entries on the bar chart that I created with PROC SPLOT?” Although there is no option that does this directly in PROC SGPLOT, the answer […]

Post a Comment

G100 with SGPLOT

The GCHART procedure has a popular option called G100 to display all the subgroups in % format such that all the subgroup values add up to 100% for each group.   Each subgroup is labeled with its own % values. SGPLOT procedure does not such an option, but with a little bit of […]

Post a Comment

Grouped Bar Chart with StatisticsTable

Creating a Bar Chart with a table of statistical data aligned with the bars is a popular topic.  With SAS 9.4, creating such graphs gets easier with the new AXISTABLE statement in GTL and SG procedures.  But some use cases can flummox the latest gizmos.  Such is the case I ran into recently. Here […]

Post a Comment

Healthcare.gov numbers

Working at SAS, I consider myself fortunate to have the best employee benefits in the industry.  That is one of the factors placing SAS as one of the best companies to work for worldwide, and often THE best company to work for in USA. Given that, I was curious to know the kind […]

Post a Comment

Bar Charts with Stacked and Cluster Groups

Creating bar charts with group classification is very easy using the SG procedures.  When using a group variable, the group values for each category are stacked by default.  Using the sashelp.prdsale data set and default STAT of SUM, here is the graph and the code. SGPLOT code: proc sgplot data=sashelp.prdsale; […]

Post a Comment

BarLine Graphs

A Bar Line graph is commonly used in many domains.  The SGPLOT procedure makes it easy to create bar line graphs where the user can customize it in many different ways.  This post is prompted by a recent question on the communities page on creating such a graph, with one bar and […]

Post a Comment

Parametric Bar Charts

A parametric bar chart in SG Procedure and GTL parlance is a simplified version of the regular bar chart, where the data is assumed to be summarized prior to its usage inside the SG procedures or GTL.  So, multiple occurrences of the same category and / or group combination is […]

Post a Comment

Percent VBar

Recently a reader chimed in with a question on the Do Loop article by Rick Wicklin on how to create a bar chart with percent statistics.  Rick used SAS 9.3  and the reader wanted to do the same with SAS 9.2. For the basic (non-grouped) bar chart, the process is the […]

Post a Comment

Doing more with nbsp

A few weeks ago I wrote an article on using the non breaking space character to prevent stripping of leading and trailing blanks in a string.   Since then, I have discovered a few more instances where the nbsp can be a useful tool for creating graphs. One such instance came up last week […]

Post a Comment