Series Plot Task

About the Series Plot Task

The Series Plot task creates a line plot. Series plots display a series of line segments that connect observations of input data.

Example: Series Plot of Stock Trends

In this example, you want to create a series plot that shows stock trends.
To create this example:
  1. In the Tasks section, expand the Graph folder and double-click Series Plot. The user interface for the Series Plot task opens.
  2. On the Data tab, select the SASHELP.STOCKS data set.
  3. Assign columns to these roles:
    Role
    Column Name
    X variable
    Date
    Y variable
    Open
    Group variable
    Stock
  4. To run the task, click Submit SAS code.
The resulting series plot shows the stock values for three companies.
Stock Trends for Each Company

Assigning Data to Roles

You can subset the data in the input data set by applying an SQL WHERE clause. In the Where string box, enter your valid SQL syntax. You must enclose character strings in single quotation marks. To view this WHERE clause with the resulting graph, select the Include as footnote check box.
To run the Series Plot task, you must assign columns to the X variable and Y variable roles.
Role
Description
X variable
specifies the variable for the x axis.
Y variable
specifies the variable for the y axis.
Group variable
specifies a variable that is used to group the data.
URL variable
specifies a character variable that contains URLs for web pages to be displayed when parts of the plot are selected within an HTML page.

Setting Options

Option Name
Description
Title and Footnote
You can specify a custom title and footnote for the output. You can also specify the font size for this text.
Plot Details
You can specify the symbol type, color, and size of the markers in the scatter plot. You can also specify the degree of transparency for the plot. The range is 0 (completely opaque) to 1 (completely transparent).
Plot Labels
Show plot labels
adds a label for the curve. You can also specify the size of this text.
X Axis, Y Axis
Show grid lines
creates grid lines at each tick on the axis.
Show label
displays the label for the axis. By default, the label is the variable name.
To customize, enter this label in the Custom label box.
Legend Details
Legend location
specifies whether the legend is placed outside or inside of the axis area.
Graph Size
You can specify the width and height of the graph in inches, centimeters, or pixels.