Previous Page  Next Page 
SAS/INSIGHT Statements

BAR Statement

BAR variable-list

          < / < FREQ=variable > < OTHER=value >

          < XAXIS=axis > < YAXIS=axis > >;

The BAR statement creates bar charts or histograms for the specified Y variables. You can use the FREQ= option to assign a Frequency variable.

Use the OTHER= option to set the "Other" threshold for nominal bar charts. The "Other" threshold is a percentage between 0 and 100.

Use the XAXIS= and YAXIS= options to specify axes for numeric variables with interval measurement level. The axis specification is a list of six numeric values: First Tick, Last Tick, Tick Increment, Number of Minor Ticks, Axis Minimum, and Axis Maximum.

For example, to specify tick marks ranging from 2 to 8, with tick increment 2, 1 minor tick, and Y axis ranging from 0 to 10, you could use

   bar age / yaxis = 2 8 2 1 0 10;

Note that the "X" and "Y" prefixes refer to variable roles, not vertical or horizontal orientation. For the BAR statement, the YAXIS= option specifies the axis of the Y variable, and the XAXIS= option specifies the Frequency axis.

Previous Page  Next Page  Top of Page

Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.