PROC SGPLOT displays titles inside the graph. If you want to display a title inside the graph and a different title outside the graph, you can use the ODS LAYOUT or the GTL. The ODS LAYOUT gives you precise control over your output and enables you to display multiple graphs and tables in each page.
Author
SG annotation is a powerful technique for adding text, lines, arrows, shapes, and images to graphs. This post provides a macro that can help you when you make a mistake in writing the annotations.
In this post, I will review some of graphs from previous posts while concentrating on just the axes, grid lines, and reference lines. They might not be the most exciting parts of a graph, but there are multiple options that when properly used can turn a good graph into a great graph.
When displaying maps, geometric shapes (such as circles), or results of certain analyses, it is important to equate axes. This post illustrates options in PROC SGPLOT that enable you to equate axes.
This post presents some basic aspects of ODS Graphics: enabling, selecting, and displaying graphs.
You can use a range attribute map to control the mapping of values in a continuous variable to colors. This post shows you how to use PROC SGPLOT to display multiple plots in the same graph and use range attribute maps.
A vector plot draws a line from one point in a graph to another point. In this post, I will show you how to create short vectors instead of vectors that emanate from the origin. I also show how to modify the positions of the vector labels.
Customizing the Kaplan-Meier plot in assorted ways is so popular that we devote an entire chapter to it in the SAS/STAT documentation.
Did you know that you can make a graph extend across multiple pages? Making a multipage graph poses no problem for ODS Graphics---you simply use a BY variable to create page breaks. Most of the work involves deciding where to break pages and properly labeling continuations.
The Dw.p format displays numeric values, in a field w positions wide, possibly with a great range of values, lining up decimals for values of similar magnitude. The BESTDw.pformat combines the BESTw. format for integers and the Dw.p format for nonintegers. Specifying BESTDw.p (where p = w - 1) is better than specifying BESTw. for columns, since decimals do not shift when the last digit is 0.
When the data object that underlies a graph is not quite in the form that you want, you might be able to use GTL expressions to produce precisely the graph that you want.
Today, I focus on the steps needed to make a graph that is composed of multiple heterogeneous components (in this case, dendrograms and a heat map).
This post shows you how to make a bar chart and an X-axis table; ensure consistency in the order of the legend, bar subgroups, and axis table rows; coordinate the colors for each of those components; and drive all the color choices from an attribute map.
Today's post illustrates the REG, PBSPLINE, LOESS, SERIES, and SPLINE statements in PROC SGPLOT. The GROUP= and BREAK options in the SERIES statement are also discussed.
PROC SGPLOT writes a graph template and uses it to create a graph. You can edit the template and then create a modified graph.
I review some fundamental principles of creating axis tables along with graphs that have TYPE=LINEAR or TYPE=DISCRETE axes.
Axis tables enable you to combine tabular and graphical information into a single display. I love axis tables. My involvement with axis tables dates back over 30 years to their ancient predecessor, the table that contains an ASCII bar chart. In the mid 1980s, I created a table in PROC
In my previous post, I showed you how to change the titles in graphs produced by analytical procedures; today I will show you how to remove subtitles that procedures display on some output pages. The following step creates output that contains a SAS title ('Illustrate the CIF Plot'), a PROCTITLE
Have you ever wanted to modify a graph title that is produced by an analytical procedure? You can make a wide variety of changes by modifying the graph template. Modifying the graph template is straight forward. You specify ODS TRACE ON, run the procedure, find the template name, display the
In this post, I will show you how to control the order of the entries in a legend and explicitly control the correspondence between groups and style elements in PROC SGPLOT. In many cases, the colors that are used to differentiate groups do not matter--the graph simply needs to display
There are many ways to use a heat map. For big data sets, heat maps provide a substitute for scatter plots. Heat maps can also be used to enhance small tables. Several of my colleagues (Sanjay Matange, Pratik Phadke, Rick Wicklin, Chris Hemedinger, and probably others) have posted about using
I have written a new book: Basic 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. This new book complements my other
A customer wants to use PROC REG to fit a simple regression model but display in the fit plot markers that differentiate groups of individuals. Click on a graph to enlarge. Before we see how to do that, let's look at some simpler examples. The following step fits a linear
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:
In the past few weeks, I have written two posts on SG annotation and on saving and then modifying the graphs that analytical procedures produce: Modifying dynamic variables in ODS Graphics Annotating graphs from analytical PROCs Today, I finish this series with one more post. This one shows how you
There are many ways to modify the graphs that SAS creates. Standard graph customization methods include template modification (which most people use to modify graphs that analytical procedures produce) and SG annotation (which most people use to modify graphs that procedures such as PROC SGPLOT produce). However, you can also
If you are familiar with the output delivery system (ODS), then you know that you can modify the tables and graphs that analytical procedures display by modifying table and graph templates. Perhaps less familiar is the fact that you can also modify dynamic variables. Tables and graphs are constructed from
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,