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: See my newest book Basic ODS Graphics Examples

I had presented an introductory tutorial on ODS Graphics for many years. Much of the tutorial material can also be found in these SAS/STAT chapters and SAS Press book that I wrote:

Using the Output Delivery System

Statistical Graphics Using ODS

ODS Graphics Template Modification

Customizing the Kaplan-Meier Survival Plot

A few years ago, I presented a longer version of the tutorial that included SG annotation, axis tables, and other advanced topics. I started writing additional documentation that included these topics. The new book grew out of that effort. A few examples use the graph template language, most use PROC SGPLOT, and many use SG annotation. These are advanced examples, so if you are not familiar with ODS Graphics, start with the examples in the sources listed above.

The book has the following examples:

Axes

- Multiple Axes, Offsets, and Drop Lines
- Multiple Axes and Highlighted Points
- Multiple Axes, Axis Alignment, and Many Tick Labels
- Broken Axes
- Multiple Plots with Equated Axes

Axis Tables

- Axis Table Example Using PROC REG
- Creating a Forest Plot Using PROC SGPLOT
- Stem-and-Leaf Plot with a Box Plot
- Axis Table Example Using PROC AUTOREG

Annotation

- Replacing Tick Labels
- Understanding the Drawing Spaces
- Displaying Text in a Graph
- Drawing Lines
- Custom Markers, No Markers, and the Data Region
- Displaying Images in a Graph
- Lines, Circles, Ovals, Rectangles, and Other Shapes
- Watermarks
- Rotating Text
- Continuing Text
- Shape and Scale of Arrowheads
- Text Justification and Anchoring
- Selecting the X, X2, Y, and Y2 Axes
- Scaling Images
- Adding Links to Graphs
- SG Annotation Functions, Variables, and Their Values

Bars, Lines, Curves, and Arrows

- Adverse Events Plot
- Attribute Maps
- Connecting Points with Lines, Arrows, and Curves

Plots of Labeled Points

- Placing Labels in Scatter Plots
- Changing How Vectors Are Displayed

Advanced Customization of Graphs That Analytical Procedures Produce

- Changing Dynamic Variables by Using the ODS Document
- Annotating Single-Panel Graphs That Analytical Procedures Produce
- Annotating Multiple-Panel Graphs That Analytical Procedures Produce

## 9 Comments

Warren,

Thank you very much! This will be very useful.

Brian Adams

Warren,

Thanks for your contribution. This will be a great resource.

Kannan Deivasigamani

What a great resource!

LOVE it! Thank you for writing it.

Thank you very much.

and... Happy Thanksgiving 🙂

Many thanks for sharing your book, Advanced ODS Graphics Examples. For some reason, the following links in your blog did not work and please check.

Using the Output Delivery System

Statistical Graphics Using ODS

ODS Graphics Template Modification

Customizing the Kaplan-Meier Survival Plot

Thanks Elizabeth. I absentmindedly provided links that only worked internally at SAS. They should work for you now.

Pingback: Boxplot with connect - Graphically Speaking

Pingback: What colors does PROC SGPLOT use for markers? - The DO Loop