18CREATING CUSTOM GRAPHS
SAS provides several procedures for creating graphs, which are an essential part of data analysis. In this chapter, graphs that are often used to complement the data analyses discussed in this book are illustrated by example. Some of these were discussed in earlier chapters. This chapter provides more details and introduces graphs that have not been discussed earlier.
In fact, SAS provides a number of other sophisticated techniques for creating a variety of graphs that are not discussed in this chapter. However, you should be able to take what you learn here and adapt it to other SAS graphs.
18.1 CREATING SCATTERPLOTS AND LINE GRAPHS USING GPLOT
PROC GPLOT
is the basic routine used to obtain several types of graphs in SAS. This section illustrates how to create scatterplots and line graphs using PROC GPLOT
, with an emphasis on creating graphs that are useful for data analysis. The abbreviated syntax for this procedure is as follows:
PROC GPLOT <options>; <PLOT plot‐request(s)/ option(s)>;
It is a good idea to include the following command to reset all SAS graphics options before you use PROC GPLOT
or other SAS graph procedures:
GOPTIONS RESET=ALL;
Moreover, it is a ...
Get SAS Essentials: Mastering SAS for Data Analytics, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.