It is always a pleasure to attend SAS user conferences, regional conferences and in-house events. In addition to presenting papers, seminars and super demos to the attendees myself, my favorite activity is to attend presentations by users that include graphical data visualization. These include using SG procedures, GTL, Designer or SAS/GRAPH. This year
Tag: SGPLOT procedure
In recent conversations with many SAS users at NESUG, SESUG and WUSS, a pattern emerges on the question of creating graphs with SAS or R. Many SAS users are aware of the new graph features in SAS that create high quality graphs with minimum fuss. But, many have not actually used
In reference to a previous article on Violin Plots, a reader asked about creating comparative mirrored histograms to compare propensity scores. While I had my own understanding of "Mirrored Histograms", I also looked this up on the web. Google showed many cases of two histograms back to back, either horizontally or vertically.
I decided this year to get serious about my running. I started recording my distance for every run. I made a SAS data set and generated simple reports. After a few weeks, I set a goal of averaging one marathon a week (3.8 miles per day, 26.2 miles per week,
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
A couple of weeks back I described q way to create a Schedule Chart using the SGPLOT procedure. In that case, I used the HIGHLOW plot to draw bar segments, both for a single and grouped case. A natural extension is to create one with links between each segment. So,
Last week Bruno asked about creating a Schedule Chart using SG Procedures. To me, such projects are very interesting and challenging...How much mileage can we get out of the current set of SGPLOT procedure features to create a visual that was not part of the original requirements? The clear choice for
A couple of weeks back we had a question on how to make a bar chart with stacked and clustered groups. User also wanted to display the value for each stacked segment below the bars. The article Bar Charts with Stacked and Cluster Groups shows how to create such a
Recently, SAS released SAS Solutions OnDemand for academics. An academic user who is signed up for this can use the SAS Web Editor application to do all their data analysis over the web using a hosted server at SAS. This frees up the user from having to install the software on their own computers,
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;
As promised, here is a better combined AE-CM graph, using some of the UI improvements suggested by our UI expert, Riley. His suggestions helped to reduce the clutter in the graph, while still keeping all the features preferred by our users. Click on the graphs for a higher resolution image.
At the SAS Global Forum 2013 in San Francisco, I presented a paper on making Patient Profile Graphs using SAS. You can follow the link to see the graphs presented in this paper. In that paper, I presented ways to create AE, CM, VS and Lab graphs. I discussed aligning the
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
The SAS Global Forum conference last week was awesome. From the perspective of graphics, there were more papers from uses on graphics and ODS graphics then in recent times. I will post a summary shortly. One of the interesting papers was "#113-2013 - Creating Clark Error Grid using SAS/GRAPH and Annotate..."
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
In my previous article on Adverse Event Timeline Graph, I wrote about how to create the AE timeline using SAS 9.2 code, using VECTOR plot and the MARKERCHAR option in SCATTER plot. I described a better way to place the labels at the lower end of the vectors. SAS 9.3 provides an easier way
A commonly requested graph is a bar chart with response and targets. With SAS 9.3, the SGPLOT procedure supports new "parametric" plot statements called HBARPARM and VBARPARM. These statements are special versions of the HBAR and VBAR statements and they expect summarized data for each category or category+group combination. Also,
A recent question by a user lead led me to experiment with what is often referred to as conditional highlighting. The user wanted to display a bar chart of response by year, where each bar is colored by year, and show a cross hatch pattern on the bars where the
Back in February, I posted an article on creating Adverse Event Timeline Graph. In the SAS 9.2 version (first one), one item that was less than ideal was the way to position the AE names to the left of the event. The AE names are displayed using the scatter plot statement
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
Pie charts have been the subject of some criticism when they are used to compare measures across multiple categories. It is generally accepted that comparison of magnitudes represented as angular measures from varying baselines is not effective. However here are some use cases where a pie chart does quite well. When it comes
Forest plots come in many flavors. An example of a Forest plot using GTL is available on the SAS support web site. Simple forest plots can also be created using SGPLOT procedure by using the SCATTER statement with MARKERCHAR to display data aligned with the plot by study names. One issue
In the Clinical Research domain, there is often the need to display lab values by treatment or test and it is often useful to view this data along with reference lines showing the normal ranges. The obvious way is to use reference lines to denote the normal ranges. SGPLOT Code: proc sgplot data=band; scatter x=x y=y
When comparing results by category and group, putting the items to be compared close together usually leads to a graph that is easier to decode. Take the case of the data (simulated) shown below. Here we have population by age group and sex. To compare the population by sex, it is
A key element of graphs used for analysis of safety data for clinical research is the inclusion of statistical data (or tables) about the study that are aligned with the x axis of the graph. A common example of this comes from the paper "Graphical Approaches to the Analysis of
Spark lines, made popular by Edward Tufte, provide a way to visualize trends in a concise space, often inline with the rest of the narrative or data. Previously, I posted an article on Spark Plots in which I created different plot types, some of which included multiple graphs and data in each row. For such
Statistical graphs often include display of derived statistics along with the raw data. Often these statistics are presented in a tabular format inside the graph. With SGPLOT procedure, a table of statistics can be added to the graph as an inset table, as shown below. Using a Stat Table: SGPLOT code:
ODS Graphics components like GTL and SG procedures are designed to work with Styles to create graphs that are effective in the delivery of information and aesthetically pleasing out of the box. You no longer have to tweak the colors to ensure a nice graph. The graph derives all the
A graph in a recent article in Fortune magazine caught my eye. The graph shows the cost of hosting the Summer Olympics over the past eight events. Here is what I termed the "Medal" graph. Now, practitioners of the art of Effective Graphics would likely find some shortcomings in the graph. Clearly
Getting the axis values just right generally requires some work, and the values you want can change from case to case. One such example was discussed by Dan Heath in his post on custom axis values. Here Dan shows the usage of non uniform axis values using the VALUES option on