Producing Charts to Summarize Variables |
PROC CHART Statements |
PROC CHART <DATA=SAS-data-set >
<options>;
|
starts the CHART procedure. You can specify the following options in the PROC CHART statement:
specifies the kind of chart and can be any of the following:
You can use any number of chart statements in one PROC CHART step. A list of options pertains to a single chart statement.identifies the variables to chart (called the chart variables).
specifies a list of options. Not all types of chart support all options.
You can use the following options in the VBAR, HBAR, and BLOCK statements:
produces a set of bars or blocks for each value of variable.
proportionally fills each block or bar with characters that represent different values of variable.
creates a bar, block, or section for every value of the chart variable.
specifies the number-of-midpoints. The procedure selects the midpoints.
specifies the variable to use to determine the size of the bars, blocks, or sections.
PROC UNIVARIATE Statements |
PROC UNIVARIATE <option(s)>; |
CLASS variable-1<(variable-option(s))> <variable-2<(variable-option(s))>> </option(s)>; |
HISTOGRAM <variable(s)> </option(s)>; |
INSET <keyword(s) > </option(s)>; |
starts the UNIVARIATE procedure. You can specify the following options in the PROC UNIVARIATE statement:
specifies up to two variables whose values determine the classification levels for the component histograms. Variables in a CLASS statement are referred to as class variables.
You can specify the following option(s) in the CLASS statement:
specifies the display order for the class variable values, where
orders values according to their order in the input data set.
orders values by their ascending formatted values. This order depends on your operating environment.
orders values by descending frequency count so that levels with the most observations are listed first.
orders values by their unformatted values, which yields the same order as PROC SORT. This order depends on your operating environment.
creates histograms and comparative histograms using high-resolution graphics for the analysis variables that are specified. If you omit variable(s) in the HISTOGRAM statement, then the procedure creates a histogram for each variable that you list in the VAR statement, or for each numeric variable in the DATA= data set if you omit a VAR statement.
You can specify the following options in the PROC UNIVARIATE statement:
specifies the color for grid lines when a grid displays on the histogram.
specifies to display a grid on the histogram. Grid lines are horizontal lines that are positioned at major tick marks on the vertical axis.
specifies the offset in percentage screen units at both ends of the horizontal axis.
specifies to display a grid on the histogram. Grid lines are horizontal lines that are positioned at major tick marks on the vertical axis.
specifies the line type for the grid when a grid displays on the histogram. The default is a solid line.
determines the width of the histogram bars as the difference between consecutive midpoints. PROC UNIVARIATE uses the same value(s) for all variables. You must use evenly spaced midpoints that are listed in increasing order.
specifies tick mark values for the vertical axis. Use evenly spaced values that are listed in increasing order. The first value must be zero and the last value must be greater than or equal to the height of the largest bar. You must scale the values in the same units as the bars.
specifies the number of minor tick marks between each major tick mark on the vertical axis. PROC UNIVARIATE does not label minor tick marks.
places a box or table of summary statistics, called an inset, directly in the histogram.
You can specify the following options in the PROC UNIVARIATE statement:
specifies one or more keywords that identify the information to display in the inset. PROC UNIVARIATE displays the information in the order that you request the keywords. For a complete list of keywords, see the INSET statement in SAS/GRAPH: Reference.
specifies a format for all the values in the inset. If you specify a format for a particular statistic, then this format overrides FORMAT=format.
specifies the heading text where string cannot exceed 40 characters.
determines the position of the inset. The position is a compass point keyword, a margin keyword, or a pair of coordinates (x, y). The default position is NW, which positions the inset in the upper-left (northwest) corner of the display.
GOPTIONS Statement |
specifies values for graphics options. Graphics options control characteristics of the graph, such as size, colors, type fonts, fill patterns, and symbols. In addition, they affect the settings of device parameters, which are defined in the device entry. Device parameters control such characteristics as the appearance of the display, the type of output that is produced, and the destination of the output.
FORMAT Statement |
enables you to display the value of a variable by using a special pattern that you specify as format-name.
Copyright © 2012 by SAS Institute Inc., Cary, NC, USA. All rights reserved.