### 15.4 GRAPH

    GRAPH
            /HISTOGRAM = var
            /SCATTERPLOT [(BIVARIATE)] = var1 WITH var2 [BY var3]
            [ /MISSING={LISTWISE, VARIABLE} [{EXCLUDE, INCLUDE}] ]
    		[{NOREPORT,REPORT}]

The `GRAPH` produces graphical plots of data. Only one of the subcommands `HISTOGRAM` or `SCATTERPLOT` can be specified, i.e. only one plot can be produced per call of `GRAPH`. The `MISSING` is optional.

The subcommand `SCATTERPLOT` produces an xy plot of the data. The different values of the optional third variable var3 will result in different colours and/or markers for the plot. The following is an example for producing a scatterplot.

    GRAPH
            /SCATTERPLOT = height WITH weight BY gender.

This example will produce a scatterplot where height is plotted versus weight. Depending on the value of the gender variable, the colour of the datapoint is different. With this plot it is possible to analyze gender differences for height vs. weight relation.

The subcommand `HISTOGRAM` produces a histogram. Only one variable is allowed for the histogram plot. For an alternative method to produce histograms see EXAMINE. The following example produces a histogram plot for the variable weight.

    GRAPH
            /HISTOGRAM = weight.