The SGPLOT Procedure |
Interaction: | The HISTOGRAM statement can be combined only with DENSITY statements in the SGPLOT procedure. |
Note: | The range of the response variable is automatically divided into an appropriate number of bins. |
Featured in: | Combining Histograms with Density Plots |
HISTOGRAM response-variable </ option(s)>; |
option(s) can be one or more options from the following categories:
Histogram options:
BOUNDARY= LOWER | UPPER | |
FILL | NOFILL | |
FILLATTRS= style-element | (COLOR= color) | |
FREQ= numeric-variable | |
OUTLINE | NOOUTLINE | |
SCALE= COUNT | PERCENT | PROPORTION | |
SHOWBINS |
Plot options:
LEGENDLABEL= "text-string" | |
NAME= "text-string" | |
TRANSPARENCY= numeric-value | |
X2AXIS | |
Y2AXIS |
Required Arguments |
specifies the response variable for the histogram.
Options |
specifies how boundary values are assigned to bins.
specifies that boundary values are assigned to the lower bin.
specifies that boundary values are assigned to the upper bin.
Default: | UPPER |
specifies whether the area fill is visible. The FILL option shows the area fill. The NOFILL option hides the area fill.
Default: | The default status of the area fill is specified by the DisplayOpts attribute of the GraphHistogram style element in the current style. |
specifies the appearance of the area fill. You can specify the color of the fill by using a style element or by using the COLOR= suboption. For more information about specifying colors, see SAS/GRAPH Colors and Images in the SAS/GRAPH: Reference, Second Edition.
Note: This option has no effect if you specify the NOFILL option.
Default: | The default color is specified by the Color attribute of the GraphDataDefault style element in the current style. |
specifies that each observation is repeated n times for computational purposes, where n is the value of the numeric variable. If n is not an integer, then it is truncated to an integer. If n is less than 1 or missing, then it is excluded from the analysis.
specifies a label that identifies the histogram in the legend. By default, the label of the response variable is used.
specifies a name for the plot. You can use the name to refer to this plot in other statements.
specifies whether outlines are displayed for the bars. The OUTLINE option shows the outlines. The NOOUTLINE option hides the outlines.
Default: | The default status of the outlines is specified by the DisplayOpts attribute of the GraphHistogram style element in the current style. |
specifies the scaling that is applied to the vertical axis. Specify one of the following values:
the axis displays the frequency count.
the axis displays values as a percentage of the total.
the axis displays values as proportions (0.0 to 1.0) of the total.
Default: | PERCENT |
specifies that the midpoints of the value bins are used to create the tick marks for the horizontal axis. By default, the tick marks are created at regular intervals based on the minimum and maximum values.
specifies the degree of transparency for the histogram. Specify a value from 0.0 (completely opaque) to 1.0 (completely transparent).
Default: | 0.0 |
assigns the response variable to the secondary (top) horizontal axis.
assigns the calculated values to the secondary (right) vertical axis.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.