O'Reilly logo

SAS/GRAPH: Beyond the Basics by Robert Allison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EXAMPLE 10  Custom Box Plots

Purpose: Use data-driven/generalized Annotate facility code to draw a custom horizontal box plot.

It is easy to create vertical box plots (also known as box-and-whisker plots) with the SAS/GRAPH GPLOT procedure, using "symbol interpol=box". But there is no built-in support for horizontal box plots in PROC GPLOT. This is another situation where custom SAS/GRAPH programming comes in handy.

In this example, I demonstrate how to take the pre-summarized values describing a box plot, and create a custom horizontal box plot using the Annotate facility. This code should be easily re-usable for creating similar box plots with your own data, and it should also serve as a good starting point for you to write your own variations ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required