Previous Page | Next Page

The SGPANEL Procedure

HISTOGRAM Statement


Creates a histogram that displays the frequency distribution of a numeric value.
Interaction: The HISTOGRAM statement can be combined only with DENSITY statements in the SGPANEL procedure.
Note: The range of the response variable is automatically divided into an appropriate number of bins.
Featured in: Creating a Panel of Graph Cells with Histograms and Density Plots


Syntax

HISTOGRAM response-variable < / option(s)>;

option(s) can be one or more options from the following categories:


Required Arguments

response-variable

specifies a response variable for the histogram.


Options

BOUNDARY= LOWER | UPPER

specifies how boundary values are assigned to bins.

LOWER

specifies that boundary values are assigned to the lower bin.

UPPER

specifies that boundary values are assigned to the upper bin.

Default: UPPER
FILL | NOFILL

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 style attribute of the GraphHistogram style element in the current style.
FILLATTRS= style-element | (COLOR= color)

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.  [cautionend]

Default: For ungrouped data, the default color is specified by the Color attribute of the GraphDataDefault style element in the current style.

For grouped data, the default color is specified by the Color attribute of the GraphData1 ... GraphDatan style elements in the current style.

FREQ= numeric-variable

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.

LEGENDLABEL= "text-string"

specifies a label that identifies the histogram in the legend. By default, the label of the response variable is used.

NAME= "text-string"

specifies a name for the plot. You can use the name to refer to this plot in other statements.

OUTLINE | NOOUTLINE

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 bar outlines is specified by the DisplayOpts attribute of the GraphHistogram style element in the current style.
SCALE= COUNT | PERCENT | PROPORTION

specifies the scaling that is applied to the vertical axis. Specify one of the following values:

COUNT

the axis displays the frequency count.

PERCENT

the axis displays values as a percentage of the total.

PROPORTION

the axis displays values as proportions (0.0 to 1.0) of the total.

Default: PERCENT
TRANSPARENCY= numeric-value

specifies the degree of transparency for the histogram. Specify a value from 0.0 (completely opaque) to 1.0 (completely transparent).

Default: 0.0

Previous Page | Next Page | Top of Page