• Print  |
  • Feedback  |

TEMPLATE Procedure: Plot Statements (Experimental)

NEEDLEPLOT Statement


Displays observations as points connected to the X-axis by vertical line segments, and typically is used to create auto-correlation functions and residual plots.
NEEDLEPLOT Y= numeric-column | expression X= column expression < / option(s)> ;


Usage Information

Needle Plot

[Needle Plot]


Required Arguments

X

specifies the column for the X values.

Y

specifies the column for the Y values.


Options

NEEDLEPLOT Options
Option Description
BACKGROUND= color | style-reference Specifies the background color of the graph.
BACKTRANSPARENCY= number Specifies the degree of the transparency of the background color.
DATALABEL= column Specifies the labels of the data.
DATALABELCOLOR= color | style-reference Specifies the color of the data labels.
DATALABELFONTFAMILY= ' string ' | style-reference Specifies the font family of the data labels.
DATALABELFONTSIZE= dimension | style-reference Specifies the font size of the data labels.
DATALABELFONTSTYLE= NORMAL | ITALIC | style-reference Specifies the font style of the data labels.
DATALABELFONTWEIGHT= NORMAL | BOLD | style-reference Specifies the font weight of the data labels.
DATALABELFORMAT= format Specifies the format of the data labels.
DATATRANSPARENCY= number Specifies the degree of the transparency of the markers and the needles.
GRIDTRANSPARENCY= number Specifies the degree of the transparency of the grid lines.
LABELTRANSPARENCY= number Specifies the percentage of the transparency of the needle labels.
LEGENDLABEL= ' string ' Specifies the label of the legends.
LINECOLOR= color | style-reference Specifies the color of the needles.
LINEPATTERN= line | style-reference
Specifies the pattern of the needles.
LINETHICKNESS=dimension | style-reference specifies the thickness of the needles.
MARKERCOLOR= color | style-reference Specifies the color of the observation markers.
MARKERS= boolean Specifies if observation markers are displayed.
MARKERSIZE =dimension | style-reference Specifies the marker width, which is equal to the marker height.
MARKERSYMBOL= marker | style-reference Specifies the marker symbol of the observation markers.
NAME= ' string ' Assigns a name to a plot statement for reference in other template statements.
TIP= ( column-list ) Specifies the information to display when the cursor is positioned over a graph element.
TRANSPARENCY= number Specifies the degree of the transparency of the needles, markers, background, grid, labels, axis features, and wall, if displayed in a graph.
WALLTRANSPARENCY= number Specifies the degree of the transparency of the plot wall.
XAXIS= X | X2 Specifies whether data is mapped to the primary X axis or to the secondary X (X2) axis.
XAXISOPTS= axis-options Specifies one or more X axis options.
XGRID= boolean Specifies whether grid lines are drawn at the tick marks.
XMAX= number Specifies the maximum X data value to use in the display of data.
XMIN= number Specifies the minimum X data value to use in the display of data.
XOFFSETMAX= number Specifies an offset to add to the end that represents high data values on the primary X axis.
XOFFSETMIN= number Specifies an offset to add to the end that represents low data values on the primary X axis.
YAXIS= Y | Y2 Specifies whether data is mapped to the primary Y axis or to the secondary Y (Y2) axis.
YAXISOPTS= axis-options Specifies one or more Y axis options.
YGRID= boolean Specifies whether grid lines are drawn at the tick marks.
YMAX =number Specifies the maximum Y data value to use in the display of data.
YMIN= number Specifies the minimum Y data value to use in the display of data.
YOFFSETMAX= number Specifies an offset to add to the end that represents high data values on the primary Y axis.
YOFFSETMIN= number Specifies an offset to the end that represents low data values on the primary Y axis.

BACKGROUND= color | style-reference

specifies the background color of the graph.

Default: Specified by the GraphBackground:Background style reference.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
BACKTRANSPARENCY= number

specifies the degree of the transparency of the background color.

Default: 0
Range: 0 (opaque) to 1 (entirely transparent)
Interaction: The BACKTRANSPARENCY= option overrides the TRANSPARENCY= option for the background.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
See also: TRANSPARENCY= option
DATALABEL= column

specifies the labels of the data.

Default: No labels.
Tip: The position of the labels is adjusted to prevent the labels from overlapping.
DATALABELCOLOR= color | style-reference

specifies the color of the data labels.

Default: Specified by the GraphDataDefault:ContrastColor style reference.
DATALABELFONTFAMILY= 'string' | style-reference

specifies the font family of the data labels.

Default: Specified by the GraphDataText:Font_Face style reference.
Restriction: You can only specify one font family name.
DATALABELFONTSIZE= dimension | style-reference

specifies the font size of the data labels.

Default: Specified by the GraphDataText:Font_Size style reference.
DATALABELFONTSTYLE= NORMAL | ITALIC | style-reference

specifies the font style of the data labels.

Default: Specified by the GraphDataText:Font_Style style reference.
DATALABELFONTWEIGHT= NORMAL | BOLD | style-reference

specifies the font weight of the data labels.

Default: Specified by the GraphDataText:Font_Weight style reference.
DATALABELFORMAT= format

specifies the format of the data labels.

Default: The format of the column. For an unformatted numeric column, the data label uses the BEST12 format.
Restriction: The w.d format must be specified using the Fw.d format.
DATATRANSPARENCY= number

specifies the degree of the transparency of the markers and the needles.

Default: 0
Range: 0 (opaque) to 1 (entirely transparent)
Interaction: The DATATRANSPARENCY= option overrides the TRANSPARENCY= option for the marker symbols, needle lines, and labels.
See also: TRANSPARENCY= option
GRIDTRANSPARENCY= number

specifies the degree of the transparency of the grid lines.

Default: 0
Range: 0 (opaque) to 1 (entirely transparent)
Interaction: The GRIDTRANSPARENCY= option overrides the TRANSPARENCY= option for the grid lines.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
See also: TRANSPARENCY= option
LABELTRANSPARENCY= number

specifies the percentage of the transparency of the needle labels.

Default: 0
Range: 0 (opaque) to 1 (entirely transparent)
Interaction: The LABELTRANSPARENCY= option overrides the TRANSPARENCY= option for the needle labels.
See also: TRANSPARENCY= option
LEGENDLABEL= 'string'

specifies the label of the legends.

Default: No label
LINECOLOR= color | style-reference

specifies the color of the needles.

Default: Specified by the GraphDataDefault:ContrastColor style reference.
LINEPATTERN= line | style-reference

specifies the pattern of the needles.

Default: Specified by the GraphDataDefault:LineStyle style reference.
LINETHICKNESS= dimension | style-reference

specifies the thickness of the needles.

Default: 1 pixel
MARKERCOLOR= color | style-reference

specifies the color of the observation markers.

Default: Specified by the GraphDataDefault:ContrastColor style reference.
MARKERS= boolean

specifies if observation markers are displayed.

Default: FALSE
MARKERSIZE= dimension | style-reference

specifies the marker width, which is equal to the marker height.

Default: 10px
MARKERSYMBOL= marker | style-reference

specifies the marker symbol of the observation markers.

Default: CIRCLE
NAME= 'string'

assigns a name to a plot statement for reference in other template statements.

Restriction: The string specified by the NAME= option must be unique within the template.
Restriction: The string specified by the NAME= option cannot contain embedded spaces.
Tip: The NAME= option is used mostly in the DISCRETELEGEND statement in order to coordinate the use of colors, marker symbols, and line patterns between the graph and the legend.
Tip: string is case sensitive.
TIP= ( column-list )

specifies the information to display when the cursor is positioned over a graph element.

Default: All of the variables specified for the graph.
Requirement: You can activate tool tips in a SAS program by specifying an ODS GRAPHICS statement that has IMAGEFMT=STATICMAP specified.
Requirement: Tool tips are only available for graphs that are written to the ODS HTML destination. Tool tips are only displayed if they are activated by the SAS program that generates the ODS graphics output.
TRANSPARENCY= number

specifies the degree of the transparency of the needles, markers, background, grid, labels, axis features, and wall, if displayed in a graph.

Default: 0
Range: 0 (opaque) to 1 (entirely transparent)
Interaction: You can specify the transparency of individual graph elements by using the BACKTRANSPARENCY=, DATATRANSPARENCY=, GRIDTRANSPARENCY=, LABELTRANSPARENCY=, and WALLTRANSPARENCY= options. The value specified by the TRANSPARENCY= option is only applied to the transparencies that you do not specify individually.
Interaction: In a LAYOUT OVERLAY block, the TRANSPARENCY= option only affects the needles, markers, and needle labels. The LAYOUT OVERLAY statement specifies the transparency of the background, grid, axis features, and wall of the graph.
WALLTRANSPARENCY= number

specifies the degree of the transparency of the plot wall.

Default: 0
Range: 0 (opaque) to 1 (entirely transparent)
Interaction: The WALLTRANSPARENCY= option overrides the TRANSPARENCY= option for the graph wall.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
See also: TRANSPARENCY= option
XAXIS= X | X2

specifies whether data is mapped to the primary X axis or to the secondary X (X2) axis.

Default: X
Interaction: Outside of a LAYOUT OVERLAY block, an individual plot can have only one X axis. The XAXIS= option of a plot specifies whether the axis is in the primary (bottom) or secondary (top) position. The XAXISOPTS= option of a plot specifies whether the axis is displayed and specifies the axis characteristics.

Within a LAYOUT OVERLAY block, multiple plots can share a primary axis and a secondary axis. The primary and secondary axes can have different scales, and the XAXIS= option for a particular plot can map data to either axis. The XAXISOPTS= and X2AXISOPTS= options of a LAYOUT OVERLAY statement specify whether the axes are displayed, and specify the axis characteristics.

XAXISOPTS= ( axis-options )

specifies one or more X axis options.

Requirement: The list of axis options must be enclosed in parentheses and separated by spaces.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
XGRID= boolean

specifies whether the grid lines are drawn at the tick marks.

Default: FALSE
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
Interaction: If you specify or use the default XGRID= option for the OVERLAY LAYOUT statement, then the XGRID= option specified for a graph is ignored. Default characteristics for the grid lines are specified from the following attributes on the GraphGridLines style element:
Color

Foreground

Thickness

LineThickness (default=1 px)

Pattern

LineStyle (default=1)

XMAX= number

specifies the maximum X data value to use in the display of data.

Default: The maximum X value in the data.
Restriction: If the data contains values that are greater than the number specified for the XMAX= option, then the data values are excluded from the plot.
XMIN= number

specifies the minimum X data value to use in the display of data.

Default: The minimum X value in the data.
Restriction: If the data contains values that are less than the number specified for the XMIN option, then the data values are excluded from the plot.
XOFFSETMAX= number

specifies an offset to add to the end that represents high data values on the primary X axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the highest data value or highest tick value, whichever is greater. For a discreet axis, the offset is added to the highest data value, which is always the highest tick value.

Default: Generated as suitable for the graph.
Range: 0 - 1
Interaction: For a continuous axis, the offset is added after any threshold adjustment is made to the axis.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
Main discussion: THRESHOLDMAX= sub-option.
XOFFSETMIN= number

specifies an offset to add to the end that represents low data values on the primary X axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the lowest data value or lowest tick value, whichever is less. For a discreet axis, the offset is added to the lowest data value, which is always the lowest tick value.

Default: Generated as suitable for the graph.
Range: 0 - 1
Interaction: For a continuous axis, the offset is added after any threshold adjustment is made to the axis.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
Main discussion: THRESHOLDMAX= sub-option.
YAXIS= Y | Y2

specifies whether data is mapped to the primary Y axis or to the secondary Y (Y2) axis.

Default: Y
Interaction: Outside of a LAYOUT OVERLAY block, an individual plot can have only one Y axis. The YAXIS= option of a plot specifies whether the axis is in the primary (left) or secondary (right) position. The YAXISOPTS= option of a plot specifies whether the axis is displayed and specifies the axis characteristics.

Within a LAYOUT OVERLAY block, multiple plots can share a primary axis and a secondary axis. The primary and secondary axes can have different scales, and the YAXIS= option for a particular plot can map data to either axis. The YAXISOPTS= and Y2AXISOPTS= options of a LAYOUT OVERLAY statement specify whether the axes are displayed, and specify the axis characteristics.

YAXISOPTS= ( axis-options )

specifies one or more Y axis options.

Requirement: The list of axis options must be enclosed in parentheses and separated by spaces.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
YGRID= boolean

specifies whether grid lines are drawn at the tick marks.

Default: FALSE
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
Interaction: If you specify or use the default YGRID= option for the OVERLAY LAYOUT statement, then the YGRID= option specified for a graph is ignored. Default characteristics for the grid lines are specified from the following attributes on the GraphGridLines style element:
Color

Foreground

Thickness

LineThickness (default=1 px)

Pattern

LineStyle (default=1)

YMAX= number

specifies the maximum Y data value to use in the display of data.

Default: The maximum Y value in the data.
Restriction: If the data contains values that are greater than the number specified for the YMAX= option, then the data values are excluded from the plot.
YMIN= number

specifies the minimum Y data value to use in the display of data.

Default: The minimum Y value in the data.
Restriction: If the data contains values that are less than the number specified for the YMIN= option, then the data values are excluded from the plot.
YOFFSETMAX= number

specifies an offset to add to the end that represents high data values on the primary Y axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the highest data value or highest tick value, whichever is greater. For a discreet axis, the offset is added to the highest data value, which is always the highest tick value.

Default: Generated as suitable for the graph.
Range: 0 - 1
Interaction: For a continuous axis, the offset is added after any threshold adjustment is made to the axis.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
Main discussion: THRESHOLDMAX= sub-option.
YOFFSETMIN= number

specifies an offset to add to the end that represents low data values on the primary Y axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the lowest data value or lowest tick value, whichever is less. For a discreet axis, the offset is added to the lowest data value, which is always the lowest tick value.

Default: Generated as suitable for the graph.
Range: 0-1
Interaction: For a continuous axis, the offset is added after any threshold adjustment is made to the axis.
Interaction: Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block.
Main discussion: THRESHOLDMAX= sub-option.


Previous Page | Next Page | Top of Page