SGPLOT Procedure

Example 3: Plotting Three Series

Features:

SERIES statement

Sample library member: SGPLSER
This example shows a series plot with three series on the Y axis.

Output

SPLSER - Plotting Two Series

Program

proc sgplot data=sashelp.stocks
  (where=(date >= "01jan2000"d and stock = "IBM"));
  title "Stock Trend";
  series x=date y=close;
  series x=date y=low;
  series x=date y=high;
run;
title;

Program Description

Specify the data set and the title.
proc sgplot data=sashelp.stocks
  (where=(date >= "01jan2000"d and stock = "IBM"));
  title "Stock Trend";
Create the series plots.
  series x=date y=close;
  series x=date y=low;
  series x=date y=high;
run;
Cancel the title.
title;