Have you ever been curious about your monthly water consumption and how it compares to others in your community? Recently, I had this question and decided to get ahold of my family's water usage data for analysis. Harnessing the power of data visualization, I compared my family of four's monthly
Tag: SGPLOT procedure
Amazing things can be created when you start with small pieces and stack them together. Just ask Bryan Berg. He is the current world record holder for the tallest house of cards. This same principle can be applied to the SGPLOT and SGPANEL procedures. You can take the individual plot
Survival plots are automatically created by the LIFETEST procedure. These graphs are most often customized to fit the needs of SAS users. One way to create the customized survival plot is to save the generated data from the LIFETEST procedure, and then use the SGPLOT procedure to create your custom
Curve labels in series plots can be positioned inside or outside the graph. Date variables can be specified as TYPE=LINEAR with a date format or more commonly as TYPE=DATE. Sometimes external curve labels might appear below or above the graph, particularly with TYPE=DATE axes. This post shows you ways to move them to the right of the graph.
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 a user asked about BY variable group processing for SGAnnotate with SGPLOT procedure. The user provided a simple use case for the question (always a good idea) using the sashelp.class data set. The graph included a display of reference lines for the mean value of height using annotation. The
One request came in for the previous article on Circle link graph, for the addition of arrow heads to indicate the direction of the flow. Given that I am using a SERIES plot to render the links, it is relatively easy to add arrow heads to the links as the SERIES
Last week I had the pleasure of presenting my paper "Graphs are Easy with SAS 9.4" at the Boston SAS Users Group meeting. The turn out was large and over 75% of the audience appeared to be using SAS 9.4 back home. This was good as my paper was focused on the cool new
There was a recent comment on the original 'Unbox Your Box Plots', where a user wants to see the original data for the box, but only label the outliers. As noted in the comment, labeling all the scatter markers and turning on the outlier display is not ideal. But there
Last week I posted an article on displaying polar graph using SAS. When the measured data (R, Theta) are in the polar coordinates as radius and angle, then this data can be easily transformed into the XY space using the simple transform shown below. x=r*cos(theta * PI / 180); y=r*sin(theta * PI
There are many situations where it is beneficial to display the data using a polar graph. Often your data may contain directional information. Or, the data may be cyclic in nature, with information over time by weeks, or years. The simple solution is to display the directional or time data
Often we see bar charts showing revenues or other related measures by a classifier using a visual of a stack of coins. Such visuals are not strictly for the purposes of accurate magnitude comparisons, but more for providing an interesting visual to attract the attention of the reader. In other words -
I have written a new book on advanced ODS Graphics examples. It is available as a free PDF file on the web. It is in color, and all of the SAS code is available by double clicking a link at the beginning of each example. Advanced ODS Graphics Examples Update:
Beginning with the first maintenance of SAS 9.4, you have the ability to define your own symbol markers using the SYMBOLCHAR and SYMBOLIMAGE statements. With these statements you can select a Unicode value or you can select an image file that exists on the local file system—making the possibilities for
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
At PharmaSUG 2014 in San Diego, I had the pleasure of attending "Swimmer Plot: Tell a Graphical Story of Your Time to Response Data Using PROC SGPLOT", by Stacey Phillips. In this paper, Stacey presented an interesting graph showing the effects of a study drug on patients' tumor size. Stacey
Recently, a user posed a question on how to plot stacked frequencies on a time axis. The data included frequencies of different viruses by week. The data is modified to preserve confidentiality and is shown below. The user's first instinct was to use a bar chart with stacked groups. This works for automatically computing frequencies
Just getting back from PharmaSUG 2014 in San Diego. The conference was great, both inside and outside. The organizers ordered up some great weather for the Padres game and also for dinner on the flight deck of the Midway Carrier. Our focus here being on graphics, we were all extremely gratified by the presentations in
Frequently you may want to modify the default colors, line patterns and symbols that are displayed on the graphics output produced by the Statistical Graphics, or SG procedures, and the Graph Template Language, GTL. Enhancements in SAS 9.4 have made that task much easier! In the examples below, we will look
Often, the topic of an article is motivated by a question from a user. A satisfactory resolution of the situation is usually a good indication of a topic that may be of interest to other users. On such question was posed to me by a user this weekend. He wanted to display fit
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
Often we need to plot multiple response variables on Y axes by a common variable on X axis. When the response variables are very different in magnitudes or format, we prefer to plot the variables on separate Y (Left) and Y2 (Right) axes. Here is some sample data with three response
Browsing graphs on the web, this graph caught my eye: The Arctic Sea Ice Volume Graph. My interest is not so much in the debate on Climate Change or Global Warming. To me, this graph has some interesting features that can help show the benefits of plot layering to
One of the most popular graph amongst clinical and pharmaceutical users is the Survival Plot as created from the LIFETEST Procedure. This is one graph that users most often want to customize. See Creating and Customizing the Kaplan-Meier Survival Plot in PROC LIFETEST - Warren F. Kuhfeld and Ying So, SAS Institute
A large variety of graphs fall in the category of what I call a "Single-Cell" graph. This type of graph consists of a single data region along with titles, footnotes, legends and other ancillary objects. Legends and text entries can be included in the data area. The data itself is displayed
Recently a user new to GTL and SG procedures asked how to create a Bland-Altman graph on the SAS Communities site. He included an image of the resulting graph to indicate what he wanted, I described to him how that graph can be created, but since he is new to the art
In my previous post I described the new Polygon plot statement that is included with the SAS 9.4M1 release. So, a valid question is - what is my motivation for discussing the new features in SAS 9.4M1 when most users are at SAS 9.3 or SAS 9.2 versions? Here are a
The SAS 9.4 Maintenance 1 release is now shipping to users. This is great news for GTL and SG procedures users as this release includes some useful new features. Some of these are in direct response to your requests, and others are enhancements that we think you will come to like.
Often we have situations where the category values on the graph have long character strings. This is often the case when graphing survey responses to questions. The questions may be sentences, sometimes moderately long. With SAS 9.4, GTL and SG now support the ability to display tick values split over
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