Previous Page | Next Page

The GPLOT Procedure

PLOT Statement


Creates plots in which one variable is plotted on the horizontal axis and a second variable is plotted on the left vertical axis.
Requirements: At least one plot request is required.
Global statements: AXIS FOOTNOTE, LEGEND , PATTERN , SYMBOL , TITLE
Supports: Drill-down functionality


Description

The PLOT statement specifies one or more plot requests that name the horizontal and left vertical axis variables, and can specify a third classification variable. This statement automatically does the following:

You can use statement options to manipulate the axes, modify the appearance of your graph, and describe catalog entries. 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 interpolations. For more information on the SYMBOL statement, see About SYMBOL Definitions.

In addition, you can use global statements to modify the axes; add titles, footnotes, and notes to the plot; or modify the legend if one is generated by the plot. You can also use an Annotate data set to enhance the plot.


Syntax

PLOT plot-request(s) </option(s)>;

option(s) can be one or more options from any or all of the following categories:


Required Arguments

plot-request(s)

each specifies the variables to plot and produces a separate graph, unless you specify OVERLAY. All variables must be in the input data set. Multiple plot requests are separated with blanks. You can plot character or numeric variables. A plot request can be any of these:

y-variable*x-variable<=n>

plots the values of two variables and can assign a SYMBOL definition to the plot.

y-variable

variable plotted on the left vertical axis.

x-variable

variable plotted on the horizontal axis.

n

number of the nth generated SYMBOL definition.

Note:   The nth generated SYMBOL definition is not necessarily the same as the nth SYMBOL statement. Plot requests of the form y-variable*x-variable=n assign the SYMBOL definition that is designated by n to the plot that is produced by y-variable*x-variable. For more information, see About Plot Requests that Assign a SYMBOL Definition.  [cautionend]

(y-variable(s))*(x-variable(s))

plots the values of two or more variables and produces a separate graph for each combination of Y and X variables. That is, each Y*X pair is plotted on a separate set of axes unless you specify OVERLAY.

y-variable(s)

variables plotted on the left vertical axes.

x-variable(s)

variables plotted on the horizontal axes.

If you use only one y-variable or only one x-variable, omit the parentheses for that variable, for example:

plot (temp rain)*month;

This plot request produces two plots, one of TEMP and MONTH and one of RAIN and MONTH.

y-variable*x-variable=third-variable

plots the values of two variables against a third classification variable

y-variable

variable plotted on the left vertical axis.

x-variable

variable plotted on the horizontal axis.

third-variable

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.

A separate plot (set of data points) is produced for each unique value of third-variable; that is, all plots are drawn on the same set of axes, and a legend is automatically generated to show the plot symbol and color for each value of the classification variable.

Note:   If a BY statement is used to produce multiple plots, you can make the legend identical across graphs by specifying the UNIFORM option in the PROC GPLOT statement.  [cautionend]

The following plot request produces a graph with a plot line for each department and a legend that shows the plot symbol for each department:

plot sales*weekday=dept;

For an example of a plot that specifies a third-variable, see Plotting Three Variables.

You can use more than one type of plot request in a single PLOT statement (provided that you do not specify OVERLAY), for example:

plot temp*month rain*month=2;


Options

Options in a PLOT statement affect all graphs that are produced by that statement. You can specify as many options as you want and list them in any order.

ANNOTATE=Annotate-data-set

specifies a data set to annotate plots that are produced by the PLOT statement.

Alias: ANNO=
See also: Using Annotate Data Sets.
AREAS=n

fills all the areas below plot line n with a pattern. The value of n specifies which areas to fill:

  • AREAS=1 fills the first area.

  • AREAS=2 fills both the first and second areas, and so on.

If you specify a value for the AREAS= option that is greater than the number of bounded areas in the plot, the area between the top plot line and the axis frame is filled.

Before an area can be filled, the data points that border the area must be joined by a line. Use a SYMBOL statement with one of these interpolation methods to join the data points:

INTERPOL=JOIN

INTERPOL=STEP

INTERPOL=Rseries

INTERPOL=SPLINE | SM | L

See SYMBOL Statement for details on interpolation methods.

By default, the AREAS= option fills areas by rotating a solid fill through the list of colors defined in the current style. If the NOGSTYLE option is specified, the areas are filled by rotating a solid fill through the device's color list. If the graph needs more patterns, it rotates hatch patterns, beginning with the M2N0 pattern. See PATTERN Statement for more information on map/plot patterns. However, if color is limited to a single color with the CPATTERN= or COLORS= graphic options, the solid pattern is skipped and the first default pattern is M2N0. If the COLORS= graphic option specifies a single color, use as many SYMBOL statements as you have areas to fill because the INTERPOL= setting does not automatically apply to multiple symbol definitions.

Note:   If you have specified the NOGSTYLE option and the first color in your device's default color list is black, color rotation begins with the second color in the list; that is, there are no solid black patterns. See How Default Patterns and Outlines Are Generated for more information.  [cautionend]

You can alter the default pattern behavior by specifying patterns and colors on PATTERN statements that specify map and plot patterns. A separate PATTERN definition is needed for each specified area.

If you specify the PATTERN statements, the AREAS= option uses the lowest numbered PATTERN statement first. If it runs out of patterns, it uses the default behavior for map and plot patterns. See PATTERN Statement for details.

Pattern definitions are assigned to the areas below the plot lines in the order the plots are drawn. The first area is that between the horizontal axis and the plot line that is drawn first. The second area is that above the first plot line and below the plot line that is drawn second, and so on. If the line that is drawn second lies below the line that is drawn first, the second area is hidden when the first is filled. The plots with the lower line values must be drawn first to prevent one area fill from overlaying another. If the lines cross, only the part of an area that is above the previous line is visible.

Therefore, when creating multiple plots in combination with the OVERLAY option, the PLOT statements must be ordered so that the plot request that produces the lowest line value is first (leftmost), the plot request that produces the next lowest line value is second plot request, and so on.

If you produce multiple plots with a y-variable*x-variable=third-variable plot request, the lines are plotted in order of increasing third variable values. Therefore, the data must be recoded so that the lowest value of the third variable produces the lowest plot line, the next lowest value produces the next lowest plot line, and so on.

The AREAS= option works only if all plot lines are generated by the same PLOT or PLOT2 statement.

If you use the VALUE= option in the SYMBOL statement, some symbols might be hidden. If reference lines are also specified with the AREAS= option, they are drawn behind the pattern fill.

Featured in: Filling Areas in an Overlay Plot.
Restriction: Partially supported by Java
AUTOHREF

draws reference lines at all major tick marks on the horizontal axis. If the AREAS= option is also used, the filled areas cover the reference lines. To draw lines on top of the filled areas, use the FRONTREF option. LAUTOHREF=, CAUTOHREF=, and WAUTOHREF= options can be used to change the line types, colors, and widths of these reference lines. To specify labels for these reference lines, use the HAXIS= option.

AUTOVREF

draws reference lines at all of the major tick marks on the vertical axis. If you also use the AREAS= option, the filled areas cover the reference lines. To draw lines on top of the filled areas, use the FRONTREF option in either the PROC GPLOT statement or the PLOT statement. LAUTOVREF=, CAUTOVREF=, and WAUTOVREF= options can be used to change the line types, colors, and widths of these reference lines. To specify labels for these reference lines, use the VAXIS= option.

CAUTOHREF=reference-line-color

specifies colors for reference lines drawn at major tick marks on the horizontal axis, as specified by the AUTOHREF option. The default color is either the value of the CAXIS= option or the first color in the color list.

CAUTOVREF=reference-line-color

specifies the color of reference lines drawn at major tick marks on the vertical axis, as determined by the AUTOVREF option. If you do not specify the CAUVTOREF option, the default color is the value of the CAXIS= option. If neither option is specified, the default color is retrieved from the current style or from the device's color list if the NOGSTYLE option is specified.

CAXIS=axis-color

specifies the color for the axis line and all major and minor tick marks. The default color is retrieved from the current style or from the device's color list if the NOGSTYLE option is specified.

Alias: CA=
CFRAME=background-color

fills the axis area with the specified color. If the FRAME option is also in effect, the procedure determines the color of the frame according to the precedence list given later in the FRAME option description. If the IFRAME= option is in effect, an image appears in the background instead of the color.

Style reference: Color attribute of the GraphWalls element.
CHREF=reference-line-color | (reference-line-color) | reference-line-color-list

specifies the color of reference lines drawn perpendicular to the horizontal axis. This option affects reference lines drawn with the AUTOHREF, HREF, and GRID options. Specifying a single color without parentheses applies that color to all reference lines. The CAUTOHREF= option overrides the CHREF= option for reference lines drawn with the AUTOHREF option. Specifying a single color in parentheses applies that color only to the first reference line drawn with the HREF= option. Specifying a color list applies colors sequentially to successive reference lines drawn with the HREF= option. The syntax of the color list is of the form (color1 color2 ...colorN). If you do not specify the CHREF= option, the GPLOT procedure uses the color specified by the CAXIS= option. If neither option is specified, the default color is retrieved from the current style of from the first color in the color list if the NOGSTYLE option is specified.

Alias: CH=
Style reference: Color attribute of the GraphGridLines element
COUTLINE=outline-color

specifies the color of the outline that is drawn around filled areas. The filled areas are generated when the SYMBOL statement specifies the INTERPOL=map/plot-pattern option or the GOPTIONS statement specifies the INTERPOL= option. The default outline color is specified in the current style. However, if the NOGSTYLE option is specified, then the default color is the first color in the device's color list (the foreground color), and the default slice outline color is determined as follows:

  • If you do not specify a PATTERN statement, the default outline color is the color defined in the current style.

  • If you specify the NOGSTYLE option and no PATTERN statement, the default outline color is black for the Java or ActiveX devices. Otherwise, the default outline color is the foreground color. If you specify an EMPTY PATTERN statement, then the default outline color is the same as the fill color.

The COUTLINE= option overrides the SYMBOL statement option CO=.
Restriction: Not supported by Java
Style reference: Color attribute of the GraphOutlines element
CTEXT=text-color

specifies a color for all text on the axes and legend, including axis labels, tick mark values, legend labels, and legend value descriptions. The GPLOT procedure searches for a color specification in this order:

  1. colors specified for labels and values on assigned AXIS and LEGEND statements, which override the CTEXT= option specified in the PLOT statement.

  2. the color specified by the CTEXT= option in the PLOT statement.

  3. the color specified by the CTEXT= option in the GOPTIONS statement.

  4. the color specified in the current style, or, if the NOGSTYLE option is specified, then the default color is black for the Java and ActiveX devices and the first color in the color list for all other devices.

The LEGEND statement's VALUE= color is used for legend values, and its LABEL= color is used for legend labels.

The AXIS statement's VALUE= color is used for axis values, and its LABEL= color is used for axis labels. However, if the AXIS statement specifies only general axis colors with its COLOR= option, the CTEXT= color overrides the general COLOR= specification and is used for axis labels and values; the COLOR= color is still used for all other axis colors, such as tick marks.

Note:   If you use a BY statement in the procedure, the color of the BY variable labels is controlled by the CBY= option in the GOPTIONS statement.  [cautionend]

Alias: C=
Style reference: Color attributes of the GraphValueText and the GraphLabelText elements
CVREF=reference-line-color | (reference-line-color) | reference-line-color-list

specifies the color of reference lines drawn perpendicular to the vertical axis. This option affects reference lines drawn with the AUTOVREF, VREF, and GRID options. Specifying a single color without parentheses applies that color to all reference lines. The CAUTOVREF= option overrides the CVREF= option for lines drawn with the AUTOVREF option. Specifying a single color in parentheses applies that color only to the first reference line drawn with the VREF= option. Specifying a color list applies colors sequentially to successive reference lines drawn with the VREF= option. The syntax of the color list is of the form (color1 color2... colorN). If you do not specify the CVREF= option, the GPLOT procedure uses the color specified by the CAXIS= option. If neither option is specified, the default color is retrieved from the current style of from the first color in the color list if the NOGSTYLE option is specified.

Alias: CV=
Style reference: Color attribute of the GraphGridLines element
DESCRIPTION='description'

specifies the description of the catalog entry for the plot. The maximum length for entry-description is 256 characters. The description does not appear on the plot. By default, the procedure assigns a description of the form PLOT OF variable*variable=variable.

The entry-description can include the #BYLINE, #BYVAL, and #BYVAR substitution options, which work as they do when used on TITLE, FOOTNOTE, and NOTE statements. For more information, refer to the discussion of Substituting BY Line Values in a Text String. The 256-character limit applies before the substitution takes place for these options; thus, if in the SAS program the entry-description text exceeds 256 characters, it is truncated to 256 characters, and then the substitution is performed.

The descriptive text is shown in each of the following locations:

  • in the Results window.

  • among the catalog-entry properties that you can view from the Explorer window.

  • in the Description field of the PROC GREPLAY window.

  • the data tip text for Web output (depending on the device driver you are using). See Data Tips for Web Presentations for details.

Alias: DES=
FRAME | NOFRAME

specifies whether a frame is drawn around the axis area. The default is FRAME. If you also use a BUBBLE2 or PLOT2 statement and your plotting statements have conflicting frame specifications, FRAME is used.

For the frame color, a specification is searched for in this order:

  1. the CAXIS= option

  2. the COLOR= option in the AXIS definition assigned to the vertical axis

  3. the COLOR= option in the AXIS definition assigned to the horizontal axis

  4. the default, which is the color defined by the current style.

To fill the axis area with a background color, use the CFRAME= option.

To fill the axis area with a background image, use the IFRAME= option.

specifies the color of error bars in bar charts. The default is the color of the response axis, which is controlled by the CAXIS= option.

Alias: FR|NOFR=
FRONTREF

specifies that reference lines drawn by the AUTOREF or REF= options should be drawn in front of the bars. By default, reference lines are drawn on the back plane of the axis.

GRID

draws reference lines at all major tick marks on both axes. The line color is the color of the axis. When specified in a PLOT2 statement, the reference lines are drawn on the vertical axis on the right side of the plot.

HAXIS=value-list | AXIS<1 . . . 99>

specifies major tick mark values for the horizontal axis or assigns an axis definition. By default, the procedure scales the axis and provides an appropriate number of tick marks. To assign labels to reference lines, use an axis definition that contains the REFLABEL= option. The labels are applied in sequence to all reference lines defined with the AUTOHREF and HREF= options.

The way you specify value-list depends on the type of variable:

  • For numeric variables, value-list is either an explicit list of values, or a starting and an ending value with an interval increment, or a combination of both forms:

    n <...n>

    n TO n <BY increment>

    n <...n> TO n <BY increment > <n <...n> >

    If a numeric variable has an associated format, the specified values must be the unformatted values.

  • For date-time values, value-list includes any SAS date, time, or datetime value described for the SAS functions INTCK and INTNX, shown here as SAS-value:

    'SAS-value'i < ...'SAS-value'i>

    'SAS-value'i TO 'SAS-value' i<BY interval>

  • For character variables, value-list is a list of unique character values enclosed in quotation marks and separated by blanks:

    'value-1' < ...'value-n'>

    If a character variable has an associated format, the specified values must be the formatted values.

For a complete description of value-list, see the ORDER= option in the AXIS statement.

If data values fall outside of the range that is specified by the HAXIS= option, then by default the outlying data values are not used in interpolation calculations. See About the Input Data Set for more information on values out of range.

For Web output that is generated with a Java or ActiveX device driver, certain options of the AXIS statement are not supported. For details, see AXIS Statement.

Featured in: Plotting Two Variables, Connecting Plot Data Points, and Plotting with Different Scales of Values
Restriction: Partially supported by Java and ActiveX
HMINOR=number-of-minor-ticks

specifies the number of minor tick marks drawn between each major tick mark on the horizontal axis. Minor tick marks are not labeled. The HMINOR= option overrides the NUMBER= suboption of the MINOR= option in an AXIS definition. You must specify a positive number.

Alias: HM=
Featured in: Labeling and Sizing Plot Bubbles
HREF=value-list

draws one or more reference lines perpendicular to the horizontal axis at points that are specified by value-list. See the HAXIS= option for a description of value-list. If the AREAS= option is also used, the filled areas cover the reference lines. To draw lines on top of the filled areas, use the FRONTREF option. LHREF=, CHREF=, and WHREF= options can be used to change the line types, colors, and widths of these reference lines. To specify labels for these reference lines, use the HAXIS= option.

HREVERSE

specifies that the order of the values on the horizontal axis be reversed. For Web output that is generated with a Java device driver, the horizontal axis data must be numeric. To specify line widths for these reference lines, use the WAUTOHREF= option.

Restriction: Partially supported by Java and ActiveX
HTML=variable

identifies the variable in the input data set whose values create links in the HTML output file that is generated by ODS. These links are associated with the plot points, or if the AREA= option is used, with the areas between plot lines. The links point to the data or graph that you want to display when the user drills down on the plot point or area. There is no limit on the length of the variable.

Restriction: Partially supported by Java and ActiveX for the PLOT statement and not supported by Java and ActiveX for the PLOT2 statement.
See also: Overview of Enhancing Web Presentations.
HTML_LEGEND=variable

identifies the variable in the input data set whose values are used to create links in the HTML output file that is generated by ODS. When the HTML output file is displayed in a Web browser, clicking on an element in the legend displays the URL that was specified for that legend element, based on the value of the variable that is named as the value of the HTML_LEGEND option. The maximum length for the value of this variable is 1024 characters. To see an example that generates a drill-down graph using ODS, see Creating Plots with Drill-down Functionality for the Web.

Restriction: Not supported by Java and ActiveX.
See also: Overview of Enhancing Web Presentations.
HZERO

specifies that tick marks on the horizontal axis begin in the first position with a value of zero. The HZERO request is ignored if negative values are present for the horizontal variable or if the horizontal axis has been specified with the HAXIS= option.

IFRAME=fileref | 'external-file'

identifies the image file you want to apply to the backplane frame of the plot. See also the IMAGESTYLE= option and Displaying an Image in Graph Frame. The IFRAME= option is overridden by the NOIMAGEPRINT goption. For more information about the NOIMAGEPRINT option, see IMAGEPRINT.

For Web output that is generated with the ACTIVEX or ACTXIMG device drivers,

Restriction: Not supported by Java
IMAGESTYLE= TILE | FIT

specifies whether to tile multiple instances of the image to fill the backplane frame (TILE) or to stretch a single instance of the image to fill the backplane frame (FIT). The TILE value is the default. See also the IFRAME= option.

Restriction: Not supported by Java
LAUTOHREF=reference-line-type

specifies a line type for reference lines drawn at major tick marks on the horizontal axis, as specified by the AUTOHREF option. The reference-line-type value can be a whole number from 1 to 46. A value of 1 specifies a solid line; values 2 through 46 specify dashed lines. The default line type is retrieved from the current style, or if the NOGSTYLE option is specified, the default value is 1, which draws a solid line.

LAUTOVREF=reference-line-type

specifies a line type for reference lines drawn at major tick marks on the vertical axis, as specified by the AUTOVREF option. The reference-line-type value can be a whole number from 1 to 46. A value of 1 specifies a solid line; values 2 through 46 specify dashed lines. The default line type is retrieved from the current style, or if the NOGSTYLE option is specified, the default value is 1, which draws a solid line.

Style reference: LineStyle attribute of the GraphGridLines element.
LEGEND | LEGEND=LEGEND<1...99>

generates a legend or specifies the legend to use for the plot.

  • a PLOT statement that includes the OVERLAY option does not automatically generate a legend. In these plot types, use LEGEND to produce a default legend, or LEGEND=LEGENDn to assign a defined LEGEND statement to the plot. The default legend is centered below the axis frame and identifies which colors and plot symbols represent the y-variables that you specify for the plots. To control the order of the legend entries for overlaid plots, use the ORDER= option in the LEGEND statement and specify the list of variables in quotes in the preferred order. For example, the following causes the legend entry for y3 to be displayed first, y1 next, and y2 last:

    legend1 order=('y3' 'y1' 'y2');
    proc gplot data=mydata2;
      plot (y1 y2 y3)*x / overlay  legend=legend1;
    run;
    For more information on the ORDER= option see ORDER= in the LEGEND statement.
  • a plot request of the form y-variable*x-variable=third-variable automatically generates a default legend that identifies which colors and plot symbols represent each value of the classification variable. In these plot types, override the default by using LEGEND=LEGENDn to assign a defined LEGEND statement to the plot.

If you use the SHAPE= option in a LEGEND statement, the value SYMBOL is valid. If you use the PLOT statement's AREAS= option, SHAPE=BAR is also valid.

Featured in: Generating an Overlay Plot
See also: LEGEND Statement
LHREF=reference-line-type | (reference-line-type) | reference-line-type-list

specifies line types for reference lines drawn perpendicular to the horizontal axis. The reference-line-type value can be a whole number from 1 to 46. A value of 1 specifies a solid line; values 2 through 46 specify dashed lines. This option affects reference lines drawn with the AUTOHREF, HREF, and GRID options. Specifying a single line type without parentheses applies that line type to all reference lines. The LAUTOHREF= option overrides the LHREF= option for lines drawn with the AUTOHREF option. Specifying a single line type in parentheses applies that line type only to the first reference line drawn with the HREF= option. Specifying a line-type list applies line types in sequence to successive reference lines drawn with the HREF= option. The syntax of the line type list is of the form (type1 type2... typeN). The default line type is retrieved from the current style, or if the NOGSTYLE option is specified, the default value is 1, which draws a solid line. To specify colors for these references lines, use the CHREF= option. To specify labels for these reference lines, use the HAXIS= option.

Alias: LH=
Style reference: LineStyle attribute of the GraphGridLines element
LVREF=reference-line-type | (reference-line-type) | reference-line-type-list

specifies line types for reference lines drawn perpendicular to the vertical axis. The reference-line-type value can be a whole number from 1 to 46. A value of 1 specifies a solid line; values 2 through 46 specify dashed lines. This option affects reference lines drawn with the AUTOVREF, VREF, and GRID options. Specifying a single line type without parentheses applies that line type to all reference lines. The LAUTOVREF= option overrides the LVREF= option for lines drawn with the AUTOVREF option. Specifying a single line type in parentheses applies that line type only to the first line drawn with the VREF= option. Specifying a line-type list applies line types in sequence to successive reference lines drawn with the VREF= option. The syntax of the line type list is of the form (type1 type2... typeN). The default line type is retrieved from the current style, or if the NOGSTYLE option is specified, the default value is 1, which draws a solid line. To specify colors for these references lines, use the CVREF= option. To specify labels for these reference lines, use the VAXIS= option.

For needle plots that are generated with a Java or ActiveX device driver, the value of the LVREF= option is not applied to the default reference line that is drawn at zero when the minimum value of the vertical axis is less than zero. This line is solid (not dashed).

Alias: LV=
Featured in: Connecting Plot Data Points
Style reference: LineStyle attribute of the GraphGridLines element
Restriction: Partially supported by Java and ActiveX
NAME='entry-name'

specifies the name of the GRSEG catalog entry and the name of the graphics output file, if one is created. The name can be up to 256 characters long, but the GRSEG name is truncated to eight characters. Uppercase characters are converted to lowercase, and periods are converted to underscores. The default name is GPLOT. If the name duplicates an existing name, then SAS/GRAPH adds a number to the name to create a unique name-for example, GPLOT1.

See also: About Filename Indexing
NOAXIS

suppresses the axes, including axis lines, axis labels, all major and minor tick marks, and tick mark values.

Alias: NOAXES
NOLEGEND

suppresses the legend that is generated by a plot request of the type y-variable*x-variable=third-variable.

OVERLAY

places all the plots that are generated by the PLOT statement on one set of axes. The axes are scaled to include the minimum and maximum values of all of the variables, and the variable names or labels associated with the first pair of variables label the axes.

The OVERLAY option produces a legend if you include the LEGEND or the LEGEND=n option in the PLOT statement.

OVERLAY is not enabled with plot requests of the form y-variable*x-variable=third-variable. However, you can achieve an overlay effect by using a PLOT and PLOT2 statement.

When generating output for the Web with the JAVA, JAVAMETA, or JAVAIMG device drivers, the OVERLAY option cannot be used in the PLOTor PLOT2 statement under these conditions:

  • if the PLOT or PLOT2 statement is combined with the global SYMBOL statement when the SYMBOL statement uses the INTERPOL= BOX, HILO, or STD.

  • or for JAVA output using the PLOT2 statement, in a SYMBOL statement when the SYMBOL statement uses theINTERPOL= BOX, HILO, or STD, with or without the OVERLAY option.

Featured in: Generating an Overlay Plot and Filling Areas in an Overlay Plot
Restriction: Partially supported by Java
REGEQN

displays the regression equation that is specified in the INTERPOL= option of the SYMBOL statement in the lower left hand corner of the plot. You cannot modify the format that is used for the equation.

The GPLOT regression equation is computed from the screen coordinates of the markers. Therefore, a graph might not display if the chart area for the plot becomes so small that markers cannot be drawn because there are no coordinates from which to build the regression equation. In such cases, the regression equation is no longer meaningful.

Featured in: Plotting Two Variables
Restriction: Not supported by ActiveX
SKIPMISS

breaks a plot line or an area fill at occurrences of missing values of the Y variable. By default, plot lines and area fills are not broken at missing values. The SKIPMISS option is available only with JOIN interpolation. If the SKIPMISS option is used, observations should be sorted by the independent (horizontal axis) variable. If the plot request is y-variable*x-variable=third-variable, observations should also be sorted by the values of the third variable.

See also: About the Input Data Set
VAXIS=value-list | AXIS<1...99>

specifies the major tick mark values for the vertical axis or assigns an axis definition. See the HAXIS= option for a description of the value-list. To assign labels to reference lines, use an axis definition that contains the REFLABEL= option. The labels are applied in sequence to all reference lines defined with the AUTOVREF and VREF= options.

For Web output that is generated with a Java or ActiveX device driver, certain options of the AXIS statement are not supported. For details, see AXIS Statement.

Featured in: Plotting Two Variables and Connecting Plot Data Points
Restriction: Partially supported by Java and ActiveX
VMINOR=number-of-minor-ticks

specifies the number of minor tick marks that are drawn between each major tick mark on the vertical axis. Minor tick marks are not labeled. The VMINOR= option overrides the NUMBER= suboption of the MINOR= option in an AXIS definition. You must specify a positive number.

Alias: VM=
Featured in: Labeling and Sizing Plot Bubbles
VREF=value-list

draws one or more reference lines perpendicular to the vertical axis at points that are specified by the value-list. See the HAXIS= option for a description of the value-list. If the AREAS= option is also used, the filled areas cover the reference lines. To draw lines on top of the filled areas, use the FRONTREF option. LVREF=, CVREF=, and WVREF= options can be used to change the line types, colors, and widths of these reference lines. To specify labels for these reference lines, use the VAXIS= option.

Featured in: Connecting Plot Data Points.
VREVERSE

specifies that the order of the values on the vertical axis be reversed.

VZERO

specifies that tick marks on the vertical axis begin in the first position with a zero. The VZERO request is ignored if the vertical variable either contains negative values or has been ordered with the VAXIS= option or the ORDER= option in an AXIS statement.

WAUTOHREF=reference-line-type

specifies the line width for all reference lines at major tick marks on the horizontal axis as determined by the AUTOHREF option. Line widths are specified as whole numbers with the default value being 1. To specify a color for these reference lines, use the CAUTOREF= option.

Style reference: LineThickness attribute of the GraphGridLines element
WAUTOVREF=value-list

specifies the line width for all reference lines at major tick marks on the vertical axis as determined by the AUTOVREF option. Line widths are specified as whole numbers with the default value being 1. To specify a color for these reference lines, use the CAUTOREF= option.

Style reference: LineThickness attribute of the GraphGridLines element
WHREF=value-list

specifies line widths for reference lines as determined by the horizontal axis. Line widths are specified as whole numbers. To specify a color for these reference lines, use the CAUTOREF= option.

Style reference: LineThickness attribute of the GraphGridLines element
WVREF=value-list

specifies line widths for reference lines as determined by the vertical axis. Line widths are specified as whole numbers. To specify a color for these reference lines, use the CAUTOREF= option.

Style reference: LineThickness attribute of the GraphGridLines element

Plot Requests with Multiple Variables

Plot requests with multiple variables produce a separate plot for every Y*X pair, unless you specify OVERLAY. For example, this statement produces four plots (the actual plots are produced on separate pages). See Graphs Generated by Multiple Plot Requests.

plot (y b)*(x a);

Graphs Generated by Multiple Plot Requests

[Graphs Generated by Multiple Plot Requests]


About SYMBOL Definitions

SYMBOL statements control the appearance of plot symbols and lines, and define interpolation methods. They can specify the following:

SYMBOL definitions are assigned either by default by the GPLOT procedure or explicitly with a plot request.

If no SYMBOL definition is currently in effect, the GPLOT procedure produces a scatter plot of the data points using the default plot symbol. If you need more than one SYMBOL definition, the procedure rotates through the colors defined by the current style, or if the NOGSTYLE option is specified, through the device color list. If the current color list contains only one color, or if all the colors are used, additional plot symbols are used.

If SYMBOL definitions have been defined but not explicitly assigned by a plot request of the form y-variable*x-variable=n, the procedure assigns them in the order in which they are generated. For example, this statement creates three plots:

plot y*x b*a s*r;

The procedure assigns the first generated SYMBOL definition to Y*X, the second generated SYMBOL definition to B*A, and the third to S*R.

If more SYMBOL definitions are needed than have been defined, the procedure uses the default definitions for the plots that remain.

See SYMBOL Statement.


About Plot Requests that Assign a SYMBOL Definition

Plot requests of the form y-variable*x-variable=n are useful when you use the OVERLAY option to produce multiple plots on one graph and you want to assign a particular SYMBOL definition to each plot.

With plot requests of this type it is important to remember that a single SYMBOL statement can generate multiple SYMBOL definitions, so that the SYMBOL definition that is designated by n might not be the same as the SYMBOL statement of the same number. That is, the third SYMBOL definition is not necessarily the same as the SYMBOL3 statement. See SYMBOL Statement for more information on the SYMBOL statement.

Previous Page | Next Page | Top of Page