The recent releases of SAS 9.4 have featured major enhancements to the ODS statistical graphics procedures such as PROC SGPLOT. In fact, PROC SGPLOT (and the underlying Graph Template Language (GTL)) are so versatile and powerful that you might forget to consider whether you can create a graph automatically by

The post Read more »

Tags: 9.4, data analysis, Statistical Graphics, Uncategorized

Posted in SAS | Comments Off on Let PROC FREQ create graphs of your two-way tables

One of the strengths of the SGPLOT procedure in SAS is the ease with which you can overlay multiple plots on the same graph. For example, you can easily combine the SCATTER and SERIES statements to add a curve to a scatter plot. However, if you try to overlay incompatible

The post Read more »

Tags: 14.1, 9.4, Statistical Graphics, Uncategorized

Posted in SAS | Comments Off on Overlay a curve on a bar chart in SAS

Last week I wrote about how to compute sample quantiles and weighted quantiles in SAS. As part of that article, I needed to draw some step functions. Recall that a step function is a piecewise constant function that jumps by a certain amount at a finite number of points. Graph

The post Read more »

Tags: data analysis, Statistical Graphics, Uncategorized

Posted in SAS | Comments Off on Graph a step function in SAS

It is easy to use PROC SGPLOT and BY-group processing to create an animated graph in SAS 9.4. Sanjay Matange previously discussed how to create an animated plot in SAS 9.4, but he used a macro loop to call PROC SGPLOT many times. It is often easier to use the

The post Read more »

Tags: 9.4, Statistical Graphics, Uncategorized

Posted in SAS | Comments Off on Create an animation with the BY statement in PROC SGPLOT

This week Hillary Clinton became the first woman to be nominated for president of the US by a major political party. Although this is a first for the US, many other countries have already passed this milestone. In fact, 60 countries have already elected women as presidents and prime ministers.

The post Read more »

Tags: Statistical Graphics, Uncategorized

Posted in SAS | Comments Off on Female world leaders by year of election

A kernel density estimate (KDE) is a nonparametric estimate for the density of a data sample. A KDE can help an analyst determine how to model the data: Does the KDE look like a normal curve? Like a mixture of normals? Is there evidence of outliers in the data? In

The post Read more »

Tags: Statistical Graphics, Statistical Programming, Uncategorized

Posted in SAS | Comments Off on How to visualize a kernel density estimate

One of my favorite new features in PROC SGPLOT in SAS 9.4m2 is addition of the COLORRESPONSE= and COLORMODEL= options to the SCATTER statement. By using these options, it is easy to color markers in a scatter plot so that the colors indicate the values of a continuous third variable.

The post Read more »

Tags: 14.1, Statistical Graphics, Uncategorized

Posted in SAS | Comments Off on Color markers in a scatter plot by a third variable in SAS

'Tis a gift to be simple. -- Shaker hymn In June 2015 I published a short article for Significance, a magazine that features statistical and data-related articles that are of general interest to a wide a range of scientists. The title of my article is "In Praise of Simple Graphics."

The post Read more »

Tags: Statistical Graphics, Statistical Thinking, Uncategorized

Posted in SAS | Comments Off on In praise of simple graphics