series x=date y=low;
series x=date y=high;
run;
title;
title "Stock High, Low, and Close";
proc sgplot data=sashelp.stocks;
where Date >= '01JAN2005'd and stock='IBM';
highlow x=date high=high low=low
/ close=close;
run;
title;
ods printer close;
ods html;
For information about the NEWFILE= option, see “ODS PRINTER Statement ” in SAS
Output Delivery System: User’s Guide.
Animating Multi-Page SVG Files
You can animate multi-page SVG files using SAS system options. For more information,
see “Creating Animated GIF Images and SVG Documents” on page 343.
Creating Separate Files for Multi-Page SVG Documents
You can create a separate file for each page in an SVG document by specifying the
NEWFILE=PAGE option in the ODS PRINTER statement. A new page is created when
a procedure explicitly starts a new page and not when the page size is exceeded. The first
file is named filename.svg. Subsequent filenames have a number appended, starting with
the number 1: filename1.svg, filename2.svg, and so on.
Using the default filename sasprt.svg, the following code creates three files:
• sasprt.svg contains the output from the first SGPLOT procedure.
• sasprt1.svg contains the output from the second SGPLOT procedure.
• sasprt2.svg contains the output from the third SGPLOT procedure.
options nodate printerpath=svgview papersize=("6" "6");
ods html close;
ods printer newfile=page;
proc sgplot data=sashelp.stocks (where=(date >= "01jan2000"d
and date <= "01jan2001"d
and stock = "IBM"));
title "Stock Volume vs. Close";
vbar date / response=volume;
vline date / response=close y2axis;
run;
title;
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;
title "Stock High, Low, and Close";
proc sgplot data=sashelp.stocks;
where Date >= '01JAN2005'd and stock='IBM';
Creating SVG (Scalable Vector Graphics) Files Using Universal Printing 333