Tips and Tricks

Tips and Tricks

Data Visualization
Sanjay Matange 0
Unicode Tick Values using GTL

Often it is desirable to use special Unicode characters for the tick value names on the axes.  However, SG procedures and GTL do not support Unicode strings in SAS data sets. With SAS 9.3, the SGPLOT procedure supports annotation which does support Unicode strings.  You can create an annotation data set

Data Visualization
Sanjay Matange 0
Naomi's Graph Makeover Contest

Naomi Robbins has posted a contest, part 1 of which is to submit alternative representations for the following graph: Clearly, usage of two pie charts to represent the share of the B2B and B2C referrals will invite many responses.  To create the graph, I took the data shown in the Pie Charts themselves, so we are using percent

Data Visualization
Sanjay Matange 0
Report from SCSUG 2012

Last week I attended my first SCSUG conference, this one in Houston.  Houston, the fourth most populous city in USA, is the world's capitol of the Oil and Gas industry.  So it was no surprise I met many attendees from local oil and gas related companies.  But, I also met many

Data Visualization
Sanjay Matange 0
Density Strip Plot

In the previous post on Violin Plots, we discussed the process to create custom density plots.  This work was done in collaboration with SAS user James Marcus.  This is the second installment on the same topic - Creating Density Strip Plots.  We will use the same data and process to compute

Data Visualization
Sanjay Matange 0
Violin Plots

Over the past month or more, I have been in a conversation with SAS user James Marcus, on creation of some new displays for visual communication of uncertainty.  These include display of densities using a "Violin" plot, "Density Strips" and more.   With his permission, I can share some of the

Data Visualization
Sanjay Matange 0
A Better AE Timeline

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

Data Visualization
Sanjay Matange 0
Report from SESUG 2012

This SESUG conference was a very energetic and rewarding experience, with many user presentations on graphics using SAS/GRAPH and ODS Graphics. One standout presentation for me was on "Data Merging and Exploration to Identify Associations Between Environmental Factors and Disease Outbreaks" by Neeta Shenvi, et. al.  The key part of

Data Visualization
Sanjay Matange 0
Forest Plot with Subgroups

During SAS Global Forum 2012, I had conversations with many SAS users who wanted to create Forest Plots.  However, there was one new twist.  The study names were subgrouped by categories like 'Age', 'Sex', etc., with multiple entries under each subgroup.  The name of each study within the subgrouped was indented

Data Visualization
Sanjay Matange 0
Report from MWSUG 2012

A week ago I had the pleasure of attending MWSUG 2012 in Minneapolis.  There were many presentations on Data Visualization in various tracks including the following: Using SAS ODS Graphics - Chuck Kincaid Get the best out of SAS ODS Graphics... - LeRoy Bessler Program Assisted Patient Narratives - Faye

Data Visualization
Sanjay Matange 0
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

Data Visualization
Sanjay Matange 0
How about some pie?

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

Data Visualization
Sanjay Matange 0
Compact Scatter Plot Matrix

The Scatter Plot Matrix is a great tool that provides a quick visual of potential associations between variables.  This may provide the analyst some hints on how to proceed with the analysis. Matrix of lab values for liver function tests are commonly used in clinical research.  The SGSCATTER procedure provides an easy way

Data Visualization
Sanjay Matange 0
Non-breaking space

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

Data Visualization
Sanjay Matange 0
Extended Bands

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

Data Visualization
Sanjay Matange 0
Butterfly plots

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

Data Visualization
Sanjay Matange 0
Spark lines made easy

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

Data Visualization
Sanjay Matange 0
LFT Panels

CTSPedia.org is a website of Knowledge Base for Clinical and Translational Research.  On this site you can find sample graphs for statistical analysis of safety data for Clinical Research.  Graphs included in this resource have been submitted by contributors, and include a graph for Liver Function for different tests by treatment.

Data Visualization
Sanjay Matange 0
Bar chart with response sort

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

Data Visualization
Sanjay Matange 0
Broken Y-Axis with SAS 9.2

In the previous post on Broken Y-Axis, I reviewed different ways to display data as a Bar Chart, where the response values for some categories are many orders of magnitude larger than the other values.  These tall bars force  the display of other values to be squeezed down thus making it harder to compare

Data Visualization
Sanjay Matange 0
Broken Y-Axis

Often we want to display data as a bar chart where a few observations have large values compared to the rest.  Comparison between the smaller values becomes hard as the small bars are squeezed by the tall bars.  Here is an example data, and a bar chart showing the data. The large values

1 8 9 10 11 12

Back to Top