XGRAPH

XGRAPH is available in the Statistics Base Edition.

XGRAPH is available only on systems with high-resolution graphics capabilities.

Note: Square brackets used in the XGRAPH syntax chart are required parts of the syntax and are not used to indicate optional elements. Any equals signs (=) displayed in the syntax chart are required. All subcommands except the chart expression in the first line are optional.

XGRAPH CHART=yvars BY xvars BY zvars

  /BIN START={AUTO**} SIZE={AUTO**   }
             {x     }      {WIDTH (x)}
                           {COUNT (n)}

  /DISPLAY DOT={ASYMMETRIC**}
               {SYMMETRIC   }
               {FLAT        }

  /DISTRIBUTION TYPE=NORMAL

  /COORDINATE SPLIT={NO**}
                    {YES }

  /ERRORBAR {CI     {(95)}}
                    {(n) }
            {STDDEV {(2) }}
                    {(n) }
            {SE     {(2) }}
                    {(n) }

  /MISSING USE={LISTWISE**  } REPORT={NO**}
               {VARIABLEWISE}        {YES }

  /PANEL COLVAR=varlist COLOP={CROSS**} ROWVAR=varlist ROWOP={CROSS**}
                              {NEST   }                      {NEST   }

  /TEMPLATE FILE='filespec'

  /TITLES TITLE='line' 'line2' SUBTITLE='line1'
          FOOTNOTE='line1' 'line2'

** Default if the subcommand is omitted.

yvars defines the y dimension and has the general form:

(varname [function] [data_element_type] + ...) > {varname {[COLOR]  }}
                                                          {[PATTERN]}
                                                 {1       {[COLOR]  }}
                                                          {[PATTERN]}

xvars and zvars define the x and z dimensions and have the general form:


{varname {[c]}              } > varname {[COLOR]  }
         {[s]}}                         {[PATTERN]}
{$CASENUM [LABEL=varname]   }                     
{1                          }

The + operator blends the y-axis to accommodate all the y-axis variables. It is used when separate variables are displayed on the same axis. The number 1 is a placeholder for the variables on the axis. The > operator stacks data elements on the y-axis and clusters data elements on the x-axis and z-axis. [c] or [s] indicates whether the variable should be treated as categorical or scale. $CASENUM is used when individual cases are displayed on the same axis.

Summary functions available for yvars: VALUE, COUNT, PCT, CUPCT, CUFREQ, MINIMUM, MAXIMUM, VALIDN, SUM, CSUM, MEAN, STDDEV, VARIANCE, MEDIAN, GMEDIAN, MODE, PTILE(x), GPTILE(x), PLT(x), PGT(x), NLT(x), NGT(x), PIN(x1,x2), and NIN(x1,x2).

Data element types available for yvars: BAR, HISTOBAR, and POINT.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the XGRAPH command can be generated from a number of dialogs accessible from the Graphs menu.

Release History

Release 13.0

  • Command introduced.

Example

XGRAPH CHART=([COUNT] [BAR]) BY jobcat [c] BY gender [c].