Example Program and Statement Details

Example Graph

The following graph was generated by the Example Program:
Example Fringe Plot

Example Program

proc template;
  define statgraph fringeplot;
    dynamic VAR VARLABEL;
    begingraph;
      entrytitle "Histogram and Fringeplot";
      layout overlay / xaxisopts=(label=VARLABEL)
                       yaxisopts=(offsetmin=.03);
        fringeplot VAR / datatransparency=.75
          fringeheight=3pct;
        histogram VAR;
      endlayout;
    endgraph;
  end;
run;

proc sgrender data=sashelp.cars template=fringeplot;
  dynamic var="weight" varlabel="Weight (LBS)";
run;

Statement Summary

In a FRINGEPLOT, each fringe line represents the location of the corresponding raw data value on the X axis. All fringe lines are of equal length.

Required Arguments

numeric-column
specifies a column that contains numeric values that provide the X coordinates of the data values.
expression
specifies an expression that calculates values when those values are not stored in the data.

Options

Statement Option
Description
Specifies the degree of the transparency of the fringe.
Specifies the height of the fringe lines.
Specifies a label for use in a legend.
Specifies the properties of the fringe lines.
Assigns a name to a plot statement for reference in other template statements.
Specifies roles for information defined by data columns.
Specifies the information to display when the cursor is positioned over a fringe line.
Specifies display formats for information defined by roles.
Specifies display labels for information defined by roles.
Specifies whether data are mapped to the primary X (bottom) axis or the secondary X2 (top) axis.
DATATRANSPARENCY=number
specifies the degree of the transparency of the fringe.
Default: 0
Range: 0 (opaque) to 1 (entirely transparent)
FRINGEHEIGHT=dimension
specifies the height of the fringe lines.
Default: 10 px
LEGENDLABEL= "string"
specifies a label for use in a legend.
Default: The X-variable label. If a label is not defined, the X-variable name.
LINEATTRS=style-element | style-element (line-options) | (line-options)
specifies the attributes of the fringe lines for the data points. See General Syntax for Attribute Options for the syntax on using a style-element and Line Options for available line-options.
Default: The GraphDataDefault style element.
NAME="string"
assigns a name to a plot statement for reference in other template statements.
Default: no default
Restriction: The string is case sensitive, cannot contain spaces, and must define a unique name within the template.
The specified name is used primarily in legend statements to coordinate the use of colors and line patterns between the graph and the legend.
ROLENAME=( role-name-list )
specifies user-defined roles for information contained in data columns.
Default: no default
role-name-list
a blank-separated list of rolename = column pairs.
For example, ROLENAME= ( TIP1=PCT ) assigns the column PCT to the user-defined role TIP1.
Requirement: The role names that you choose must be unique and different from the pre-defined roles X and GROUP (reserved for future use).
This option provides a way to add to the data columns that appear in tooltips specified by the TIP= option.
TIP=(role-list)
specifies the information to display when the cursor is positioned over a fringe line. If this option is used, it replaces all the information displayed by default. Roles for columns that do not contribute to the fringe plot can be specified along with roles that do.
Default: The columns assigned to these roles are automatically included in the tooltip information: X and GROUP (reserved for future use).
role-list
an ordered, blank-separated list of unique FRINGEPLOT and user-defined roles. The FRINGEPLOT role is X and GROUP.
User-defined roles are defined with the ROLENAME= option.
The following example displays tooltips for the columns assigned to the roles X and Y, as well as the column PCT, which is not assigned to any pre-defined FringePlot role. The PCT column should appear first in the tooltip.
  ROLENAME=(TIP1=PCT)
  TIP=(X TIP1)
Requirement: To generate tooltips, you must include an ODS GRAPHICS ON statement that has the IMAGEMAP option specified, and write the graphs to the ODS HTML destination.
Interaction: The labels and formats for the TIP variables can be controlled with the TIPLABEL= and TIPFORMAT= options.
TIPFORMAT=(role-format-list)
specifies display formats for tip columns.
Default: The column format of the variable assigned to the role or BEST6. if no format is assigned to a numeric column.
role-format-list
a list of rolename = format pairs separated by blanks.
  ROLENAME=(TIP1=PCT) 
  TIP=(X TIP1)
  TIPFORMAT=( TIP1= PERCENT7.2 ) 
Requirement: This option provides a way to control the formats of columns that appear in tooltips. Only the roles that appear in the TIP= option are used. Columns must be assigned to the roles for this option to have any effect. See the ROLENAME= option.
TIPLABEL=(role-format-list)
specifies display labels for tip columns.
Default: The column label or column name of the variable assigned to the role.
role-label-list
a list of rolename = "string" pairs separated by blanks.
  ROLENAME=(TIP1=PCT) 
  TIP=(X TIP1)
  TIPLABEL=( TIP1="Percent" ) 
Requirement: This option provides a way to control the labels of columns that appear in tooltips. Only the roles that appear in the TIP= option are used. Columns must be assigned to the roles for this option to have any effect. See the ROLENAME= option.
XAXIS=X | X2
specifies whether data are mapped to the primary X (bottom) axis or to the secondary X2 (top) axis.
Default: X
Interaction: The overall plot specification and the layout type determine the axis display. For more information, see How Axis Features are Determined.
The display of the fringe lines is always anchored on the X-axis (at the bottom of the plot area), even when the FRINGEPLOT’s X-variable data range is mapped to the X2 axis.