Several data sets can be presented in the same bar chart by using
a grouping specification
GROUPING=<name_of_a_string_variable>.
In the graph groups are separated by gaps. The width of such a gap
corresponds to the width of one bar.
In the data set the default order of variables is:
Grouping_variable Label_of_observation Variables_to_be_plotted
The GROUPING option is most suitable in types %HBAR,%VBAR,HBAR,VBAR
but it can be also used in other types of bar charts depending on
the situation.
The example on the next page illustrates usage of GROUPING.
.......................................................................
Example: Bar chart of several groups (PostScript version on the next page!)
DATA D
Diagnosis Symptom None_ Mild Severe
Depression SSP 34 11 6
Depression SP 40 8 2
Depression NSP 43 6 2
Anxiety SSP 36 12 5
Anxiety SP 41 9 0
Anxiety NSP 44 3 2
Hyperactivity SP 36 12 5
Hyperactivity NSP 38 10 3
GPLOT D / TYPE=%HBAR MODE=PS GROUPING=Diagnosis
HEADER=[Swiss(15)],Prevalence_of_symptoms XDIV=25,70,5
LEGEND=Symptom_severity: PEN=[autom_color(0)][Swiss(10)]
SCALE=0(10)100 SIZE=1420,950 GAP=0.2,0.7,0.7 SHADING=0,1,7
VALUES=[autom_color(0.4)][Swiss(6)],##.#%,-0.5 VALUEMIN=8
FRAMES=F F=0,0,1420,950,11
.......................................................................
PLOT D / TYPE=%HBAR DEVICE=PS,D.PS GROUPING=Diagnosis
/PS-PDF D.PS / Displaying the graph by Adobe Acrobat after PLOT
HEADER=[Swiss(15)],Prevalence_of_symptoms XDIV=25,70,5
LEGEND=Symptom_severity: PEN=[autom_color(0)][Swiss(10)]
SCALE=0(10)100 SIZE=1420,950 GAP=0.2,0.7,0.7 SHADING=0,2,6
VALUES=[autom_color(0.4)][Swiss(6)],##.#%,-0.5 VALUEMIN=8
.......................................................................
X = Extra specifications for bar/pie charts: