Graphics options affect the characteristics of a graph, such as size, colors, type fonts, fill patterns, and line thickness. The GOPTIONS statement changes the values of the graphics options that SAS uses when graphics output is created. To control the appearance of a high-resolution graph, you can specify a GOPTIONS statement before the PROC step that creates the graph. When you create charts with a graphics device, you can also use the AXIS, LEGEND, PATTERN, and SYMBOL statements to enhance your plots. If your site licenses SAS/GRAPH software, then you can use the HISTOGRAM statement to create high-resolution graphs.
Understanding How to Use SAS/GRAPH to Create Histograms For additional information about the density curves that SAS computes, see the UNIVARIATE procedure in the Base SAS Procedures Guide. You can also fit families of density curves and superimpose kernel density estimates on the histograms, which can be useful in examining the data distribution.
The HISTOGRAM statement provides various options that enable you to control the layout of the histogram and enhance the graph. determines the bar width based on the method of Terrell and Scott (1985).scales the vertical axis to show the percentage of observations in an interval.If you use the HISTOGRAM statement without any options, then PROC UNIVARIATE automatically does the following: PROC UNIVARIATE creates a histogram by dividing the data into intervals of equal length, counting the number of observations in each interval, and plotting the counts as vertical bars that are centered around the midpoint of each interval. The HISTOGRAM statement in a PROC UNIVARIATE step produces histograms and comparative histograms. This type of bar chart emphasizes the individual ranges of continuous numeric variables and enables you to examine the distribution of your data. Understanding How to Use the HISTOGRAM StatementĪ histogram is similar to a vertical bar chart.