Bar charts in SGPLOT procedure have some new features that everyone may not be familiar with. In this article we will create bar charts with color response on linear axes. Normally, the VBAR statement treats the x-axis as discrete, placing each unique value by itself, equally spaced on the x-axis.

# Author

Motivated by Ted Conway's post on creating a sequence of graphs showing the Solar Eclipse, I thought it would be fun to extend his code and create a gif animation. I used a frame count to 81, and used the printerpath feature to create the animation using SGPLOT with BY

Long category values occur frequently in real world use cases. This can happen with graphs for analysis of clinical research data, and also for graphs showing survey data where the question asked may be long (even a paragraph). Managing such long categories on the x or y axis is always

A few days ago, I posted an article on displaying first N bars from a data set. This is useful when the data is sorted by descending response, and only the first few values are significant. There were a few interesting comments, including one that was regarding the treatment of

Often we have a graph with many bars (or categories) on the x or y axis. These categories may be sorted by descending response such as frequency of a % value. An example with simulated data is shown below. title 'Actual Values by Name'; proc sgplot data=bars2 noborder; vbar name /

One key aspect of graphs used in the statistical or clinical research domains is the need to display numerical or textual information aligned with the data in the plot. Examples of such graphs are the Survival Plot or the Forest Plot. These graphs use the AXISTABLE statements available with SAS

Waterfall plots have gained in popularity as a means to visualize the change in tumor size for subjects in a study. The graph displays the reduction in tumor size in ascending order with the subjects with the most reduction on the right. Each subject is represented by a bar classified by

Recently, while reading up on Wilkinson and Cleveland Dot plots, I saw this excellent article by Xan Gregg on the topic. I also saw some interesting examples of Lollipop Charts, kind of a dot plot with statistics along with a drop line, maybe more suitable for sparse data. I thought

As many of the regular readers of this blog know, SGPLOT and GTL, provide extensive tools to build complex graphs by layering plot statements together. These plots work with axes, legends and attribute maps to create graphs that can scale easily to different data. There are, however, many instances where

A Stem and Leaf plot is a visual that can help quickly visualize the distribution of the data. This graph was particularly useful before the advent of modern statistical graphs including the Histogram and Box Plot. One nice feature of the plot is it shows the actual values in the

A frequently requested statistical graph is the scatter plot by with discrete categories along with mean value for each category. Searching for a "Scatter with Mean" will return a lot of requests for such a graph in SAS, Stata, R and other statistical software. Such a graph is very easy

On a recent trip I met a long time user and early adopter of ODS Graphics who started using GTL with SAS 9.1.3, even before it was released as production with SAS 9.2. This user has presented many papers at SGF on GTL and some hands-on sessions on ODS Graphics Designer.

When presenting information in form of a graph we show the data and let the reader draw the inferences. However, often one may want to draw the attention of the reader towards some aspect of the graph or data. For one such case, a user asked how to highlight one

Recently, while browsing health care data, I came across the graph shown below. The graph includes the healthy life expectancy at birth by countries in the EU, along with the associated per capita expenditure. The graph also shows estimate of potential gain in life expectancy by increasing expenditure efficiency. The

This is the 5th installment of the Getting Started series. The audience is the user who is new to the SG Procedures. Experienced users may also find some useful nuggets of information here. A histogram reveals features of the distribution of the analysis variable, such as its skewness and the peak which

Fitting of long category values on a x-axis is usually a challenge. With SAS 9.4, the SGPLOT procedure tries to fit the values by first splitting the values at white space to see if the values will fit in the space available. This normally works well for a small number

Last week I published an article on creating bar charts with visual category values. The idea was to use visual icons for the category values in a HBAR of age by animal. For the data, I referred to a visual from the 2010 Encyclopedia Britannica Inc. that I found on the

A grouped box plot created by SGPLOT VBOX / HBOX statement or GTL BOXPLOT statement will display groups within categories using group colors and puts the color swatches representing the group values in the legend. This works well for a color graph created as shown below. title 'Distribution of Cholesterol

We often say a picture (or graph) is worth a thousand words. So, recursively, this could apply to other text in the graph. I thought it would be interesting to see if we can create a graph with visual categories. Another benefit is that such visual categories are inherently meaningful

In his recent blog article on Drawing Paths on a Map using SGPLOT, Robert Allison showed us visually the path computed by the captain of his return flight from Orlando. As usual, one can rely on Robert to put in visual form some interesting bit of information. Thanks, Robert. I

SAS Global Forum 2017 is around the corner and SAS users are gearing up to travel to Orlando for a blockbuster conference. ODS Graphics is now a well known component of Base SAS and many readers of this blog who are proficient users of SG Procedures and GTL can look

This article is motivated by a recent question on the Communities Web Site on creating a scatter plot with additional summary information. Recently, I described how to create a scatter plot with a box overlay. While such graphs have been discussed in earlier posts, this article provided a visual benefit

This is the 4th installment of the Getting Started series. The audience is the user who is new to the SG Procedures. Experienced users may also find some useful nuggets of information here. Series plots are frequently used to visualize a numeric response on the y-axis by another numeric variable on

Funnel graphs are useful to track the number of visitors passing through various pages of a website or the number of patients in a study. The graph shows visually the retention of users or subjects in a study across levels of a marketing cycle or the study. One common representation

Back in 2013, I wrote a paper for the SAS Global Forum, reviewing the attributes that go towards making a good graph. In this paper, I covered many recommendations from industry thought leaders that can help enhance the effectiveness of graphs to deliver the intended information. One of the aspects that

Previously, I discussed ways to create a Box Plot with Stat Table and Markers in the linked article. One of the graphs showed a Box Plot of Cholesterol by Death cause along with the display of the actual observations. The main goal for that article was display of statistics with

Yesterday, I published an article on Axis values display, where I mentioned the desire expressed by many users to get x-axis tick values in Hotel text orienttion. The name comes from the way many hotel signs are displayed as shown on the right. Such arrangement of text can also be very

Displaying nicely rendered axis values reduces clutter and makes the graph more readable. With SAS 9.4, we added the ability for splitting x-axis tick values on white space to create a nice and readable x-axis as shown in the graph on the right. It is always a challenge to fit

Some observant readers may have noticed a new icon on the right sidebar of this blog announcing the release of the new SAS Press book on the ODS Graphics Designer, written in collaboration with Jeanette Bottitta. Jeanette is a Technical Writer at SAS and has worked on various SAS Graphics products

Browsing on the web, I ran into a simple but visually interesting graph of financial data. Really, it could be any data, but this one showed up under "Financial Graphs". I thought this would give me an opportunity to speak about an interesting new feature added to SERIES plot with