The topic of cluster groups comes up often. By cluster group I am referring to the feature in bar charts where the group values are displayed side by side. With SAS 9.3, SG Procedures support stack or cluster grouping for Bar Charts and overlay or cluster grouping for all other
Author
ODS Graphics system was initially motivated by the need for high quality graphs for SAS Base, STAT, and other analytical procedures. Use of SG Procedures, ODS Graphics Designer and GTL by users too has initially focused on analytical graphs. But just like wheels on carryon bags that started for the specific needs of flight
Creating a graph that looks nice, with readable, high resolution fonts is important and should be easy to do. With SG procedures and GTL, this is easy to do with a simple option, but not the default. Creating a high resolution (image) for a graph consumes higher system resources. When working on a graph,
When the data is classified by multiple class variables, you can certainly create graphs using BY variables. This results in separate graphs, one for each level of the BY variable crossings. Each graph is scaled by its own data subset, and comparisons across BY levels is harder. When comparisons need to be
The Adverse Event Timeline graph posted earlier used the MARKERCHAR option of the SCATTER plot to draw the AE names. This option places a center-justified label at the marker position. There is no option in SAS 9.2 version to right-justify the label. Hence, we have to compute an offset in data
Here is the promised follow up on the Dashboard graph. In the previous article, I posted the code to create a panel of bullet KPIs displaying three different metrics. For each KPI, I used 5 columns of data which resulted in a wide and inconvenient structure. A more convenient data structure is
In this blog we have been discussing graphs useful for analysis of data for many domains such as clinical research, forecasting and more. SG Procedures and GTL are particularly suited for these use cases. So, when I came upon a dashboard image from Steven Few's Visual Business Intelligence blog, showing the
The graph showing the distribution of the maximum liver function test values by treatment for all participants in a study is commonly used for the analysis of safety data in clinical trials. The data is often structured in multiple columns (one per treatment) as below on the left, or grouped by
The parable of beer and diapers is often related when teaching data mining techniques. Whether fact or fiction, a Heat Map is useful to view the claimed associations. A co-worker recently enquired about possible ways to display associations or dependency between variables. One option is to show the dependency as a node
Here is the second installment of sample graphs from the SG Procedures book - The Adverse Event Timeline. This is a graph commonly used in patient profiles for clinical trials where we track the progress of a patient through a hospitalization event, tracking the dates and severity of the adverse events. The
Recently a user posted a question on the SAS/GRAPH and ODS Graphics Communities page on how to plot the normal density curves for two classification levels in the same graph. We have often seen examples of a distribution plot of one variable using a histogram with normal and kernel density curves. Here is a simple example: Code Snippet:
In December of last year, the book "Statistical Graphics Procedures by Example" co-authored by Dan Heath and I was published. On the back cover, it proclaims "Free Code on the Web". Now, who can resist such an offer? Since most of the examples in the book have very short syntax,
Here are a couple of bar charts showing the city mileage of cars by Type and Origin using the SGPLOT procedure from the sashelp.cars dataset. title 'Vehicle Mileage by Type'; proc sgplot data=cars; format mpg_city 4.1; vbar type / response=mpg_city stat=mean datalabel; xaxis display=(nolabel); run; title 'Counts by Country'; proc sgplot
Recently we discussed the features of the Shiller Graph, showing long term housing values in the USA. To understand the features necesary in the SGPLOT procedure to create such graph easily, it was useful to see how far we can go using GTL as released with SAS 9.2(M3). I got the data Shiller Housing index data
Often it is useful to view multiple responses by a common independent variable all in the same plot. SGPLOT procedure and GTL support the ability to view two responses, one each on the Y and Y2 axes by one independent variable (X) in one graph. Yes, you can also have X
Recently a user posted a question on the SAS/GRAPH and ODS Graphics Forum about drawing a plot with custom confidence intervals . The user has a simple data set with category, response (mean) and custom lower and upper confidence intervals. The data looks like this: Robert Allison provided the code (proc gplot +
A recent post on the SAS website shows the SAS Annual Revenue History. It would be interesting to see how we could create such a graph using SG procedures, and how we could add more information and interest in the presentation. So, I started with the basic informaiton on the annual revenues provided,
Following up on the theme of graphs commonly used in many applications, here is another one that displays a horizontal bar chart with multiple data columns aligned with the bars. Recently at WUSS, a user stopped by asking how to create just such a graph. While this user wanted something more complex
Let us ring in the new year with something simple and useful. A recent question by a user over the holidays motivated this article on what is likely a commonly used graph. We want to compare the preformance of two categories along with a third measure. This could be something like "How
In Simple maps can go a long way, we discussed some techniques to create simple outline maps from map datasets in the MAPS library using GTL. Now, let us take this a step further to do something more useful with this feature. For some graphs, the map information is an essential part of the
A new book from SAS Press, "Statistical Graphics Procedures by Example" co-authored by Dan Heath and I has now been published (phew!). For both Dan and I, this was our first foray into writing a book, so it was highly educational to say the least. The key idea behind the presentation
Charlie Huang recently posted an article on a new way to draw maps using SGPlot procedure. The basic idea is simple, just use the SCATTER statement to plot the (x, y) points from the data sets in the MAPS library. The GROUP option can be used to color the markers for each
When viewing time series data, often we only want to see the trend in the data over time and we are not so concerned about the actual data values. With multiple time series plots, forecasting software can find clusters to help us view series with similar trends. Recently I saw a graph showing the trend of unemployment
A frequently asked question about the Survival Plot is: "How can I display the 'At Risk' data outside the plot area?". The survival plot rendered by the LIFETEST procedure displays the at risk data inside the plot data area. The reason for this is the potential for varying number of treatment groups. Here
In a previous article we discussed how to add axis aligned statistics table to a Lipid graph using GTL. Other graphs such as the Survival Plot also utilize the same technique to display the "at risk" statistics aligned by time or visits along the X axis. Often, we also need to display
Rick Wicklin's blog post on using abbreviations provided a solution for a long standing pain. When writing a new GTL program for simple graph, often the bulk of the code is boiler plate. To create a simple scatter plot of weight by height, you need to type in the following program:
In this blog we will discuss many aspects of the SG Procedures. This article will cover some basic features and workings of the SGPLOT procedure to establish a baseline. The single-cell graph is the work horse for data visualization. From the simple bar chart to the complex patient profiles for clinical
The display of statistics, aligned with graphical plot of the data, is a common requirement for graphs, especially in the Clinical Research domain. In the previous post on Discrete Offset, I used an example of the Lipid Profile graph. Now, let us use the same example and add the display of statistics in
Often we have the need to display multiple columns of data in a graph, and we want to introduce some separation into their placement in the graph. Or, we want to display a bar chart of multiple response variables, and place the values side-by-side, like in a grouped bar chart. For both
Welcome to this new blog on data visualization at SAS. Our goal is to engage with you on a discussion about analytical and business graphics for reporting and interactive applications. Our primary focus will be on ODS Graphics and related topics, but we look forward to a lively discussion on all things