Figure 15.36 Sashelp.Class Plotted by the SGPLOT Procedure as an SVG File
When you use the SVG, SVGnotip, SVGt, SVGView, and SVGZ Universal Printers,
SAS creates a single SVG document. Depending on the size of the SVG document, the
browser might display the complete SVG document. Check the documentation for your
browser to determine whether your browser has controls for viewing SVG documents. In
the Adobe SVG Viewer plug-in for Internet Explorer, you can press the Alt key and the
left mouse button to pan and move to different pages in a continuous, multi-page SVG
document.
Multi-Page SVG Documents in a Single File
When a DATA step or procedure creates a new page in the output, a new SVG page is
created in an SVG document. SAS creates either one file with multiple pages or multiple
SVG files with one file for each SVG document page. The SVGCONTROLBUTTONS
system option and the NEWFILE= option in the ODS PRINTER statement control
whether a multi-page SVG document is one continuous file (with controls to navigate
the pages in the file) or multiple SVG files.
SAS creates a single-file, multi-page SVG document with navigational controls when
the NEWFILE= option of the ODS PRINTER statement is a value other than PAGE, and
one of the following set of system options is specified:
Creating SVG (Scalable Vector Graphics) Files Using Universal Printing 329
The PRINTERPATH= system option is set to SVG or SVGZ, and the
SVGCONTROLBUTTONS system option is set.
The PRINTERPATH= system option is set to SVGView.
The SVGView Universal Printer enables the SVGCONTROLBUTTONS system option.
If the SVGCONTROLBUTTONS system option is not specified or the Universal Printer
is not SVGView, the SVG document is created in a continuous-page layout. To navigate
the document, you would use your browser controls.
The navigation controls enable you to go to the next page, the previous page, the first
page, or the last page; to display an index of all pages; or to hide or show the controls.
Figure 15.37 First Page of a Multi-page SVG File with Navigation Controls
To display an index of all pages in the SVG file, select the Index button. To go to a
specific page from the index, select the thumbnail image of the page.
330 Chapter 15 Printing with SAS
Figure 15.38 Index of a Multi-page SVG File with Navigation Controls
You can hide the control buttons by selecting the SVG Controls button. The tooltip is
displayed when the cursor is over the control. To show the navigation controls again,
click in the top area of the output when you see the tooltip Click to toggle SVG control
button bar. This is useful when you want to print a page in the document without the
SVG controls.
Creating SVG (Scalable Vector Graphics) Files Using Universal Printing 331
Figure 15.39 A Multi-page SVG File That Hides the Navigational Controls
Here is the SAS code that created the stocks.svg file:
options nodate printerpath=(svgview stocks) papersize=("6" "6") ;
filename stocks 'c:mySasoutputstocks.svg';
ods html close;
ods printer;
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;
332 Chapter 15 Printing with SAS
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: Users 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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.15.154