|The GPLOT Procedure|
|Requirements:||You cannot use the PLOT2 statement alone. It can be used only with a PLOT or BUBBLE statement. At least one plot request is required.|
|Global statements:||AXIS, FOOTNOTE , LEGEND , PATTERN, SYMBOL, TITLE|
You can use statement options to manipulate the axes and modify the appearance of your graph. You can use SYMBOL definitions to modify plot symbols for the data points, join data points, draw regression lines, plot confidence limits, or specify other types of interpolation. For more information on the SYMBOL statement see About SYMBOL Definitions.
Note: When using the PLOT2 statement to generate output with the Java or ACTIVEX device drivers, and when the global statement SYMBOL is used, the value of the SYMBOL statement option INTERPOL= cannot be BOX, STD, or HILO.
In addition, you can use global statements to modify the axes; to add titles, footnotes, and notes to the plot; or to modify the legend if one is generated by the plot. You can also use an Annotate data set to enhance the plot.
|PLOT2 plot-request(s) </option(s)>;|
each specifies the variables to plot and produces a separate graph, unless you specify the OVERLAY option. All variables must be in the input data set. Multiple plot requests are separated with blanks. A plot request can be any of these:
classification variable against which y-variable and x-variable are plotted. Third-variable can be character or numeric, but numeric variables should contain discrete rather than continuous values, or should be formatted to provide discrete values.
For more information about plot requests, see PLOT Statement.
See PLOT Statement for descriptions of options that you can use with the PLOT2 statement.
|Matching Plot Requests|
These statements produce two graphs, each with two vertical axes. The first pair of plot requests (Y*X and Y2*X) produce one graph in which X is plotted on the horizontal axis, Y is plotted on the left axis, and Y2 is plotted on the right axis. The second pair of plot requests (B*A and B2*A) produce another graph in which A is plotted on the horizontal axis, B is plotted on the left axis, and B2 is plotted on the right axis.
Plot requests of the form (y-variable(s))*(x-variable(s)). Both the PLOT and PLOT2 statements generate multiple graphs (the actual plots are produced on separate pages). See Graphs Produced by Multiple Plot Requests in PLOT and PLOT2 Statements.
When both the PLOT and PLOT2 statements use plot requests of the form y-variable*x-variable=third-variable, each statement generates a separate legend. If the third variable has two values, these statements produce one graph with four sets of data points. See Multiple Plots on One Graph. The figure assumes that SYMBOL statements are used to specify the plot symbols that are shown and to connect the data points with straight lines.
|Using a Second Vertical Axis|
If your data contain the same variable values in two different scales, such as height in inches and height in centimeters, you can display one scale of values on the left axis and the other scale of values on the right axis. If both vertical axes are calibrated so that they represent the same range of values, then for each observation of X the data points for Y and Y2 are the same.
For example, if Y is height in inches and Y2 is height in centimeters and if the Y axis values range from 0 to 84 inches and the Y2 axis values range from 0 to 213.36 centimeters, the plot is like Right Axis with Different Scale of Values.
If your data contain variables with different data values (such as height and weight), you can display one type of data on the left axis and another type of data on the right axis. Because the Y variable and the Y2 variable contain different data, two sets of data points are displayed on the graph. For example, if Y is height and Y2 is weight, the plot is like Right Axis with Different Values and Different Scale.
If your data contain two sets of values for the same type of data, you can use the PLOT2 statement to generate a right axis that is calibrated the same as the left axis so that the data points on the right of the graph are easier to read. For example, if Y is high temperatures and Y2 is low temperatures, you can create a graph like Right Axis with Same Scale of Values.
|Using PATTERN and SYMBOL Definitions|
For more information, see About SYMBOL Definitions.