Sample 25567: Create a simple web page using SAS/GRAPH® with the ODS HTML statement
This sample uses the ODS HTML statement with SAS/GRAPH to create HTML and graph output which you can display via a web browser. This code uses the ODS HTML statement with the GIF device driver to write one HTML file and one GIF file to disk. Embedded in the HTML output is a link to the GIF file.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the ODS HTML statement with SAS/GRAPH to create HTML and graph output which you can display via a web browser.
This code uses the ODS HTML statement with the GIF device driver to write one HTML file and one GIF file to disk. Embedded in the HTML output is a link to the GIF file.
The graphics output in the Results tab was produced using SASĀ® 9.2. Submitting
the sample code with releases of SAS prior to SAS 9.2 might produce different results.
/* Create a response data set */
data income;
input State Income;
datalines;
04 19001
35 17106
40 17744
48 19857
;
run;
/* This sample writes its output to C:\TEMP */
/* when run on the Windows operating system. */
/* Modify the destination on the FILENAME */
/* statement below if you want to write the */
/* output to a location other than C:\TEMP */
/* or if you are running on an operating */
/* system other than Windows. */
filename odsout 'c:\temp';
/* Set the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;
goptions device=gif xpixels=600 ypixels=400;
/* Close the listing destination */
ods listing close;
/* Open the HTML destination */
ods html path=odsout body='g25567.html';
/* Add titles to the graph */
title1 h=12pt '1994 Personal Income Per Capita';
title2 h=12pt '(Arizona, New Mexico, Texas, and Oklahoma)';
/* Define legend characteristics */
legend across=2
label=(position=top justify=left 'Average Income');
/* Create a prism map of income */
proc gmap map=maps.us data=income all;
format income dollar6.0;
id state;
choro income / discrete
legend=legend name='g25567';
run;
quit;
/* Close the HTML destination and */
/* open the listing destination */
ods html close;
ods listing;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the ODS HTML statement with SAS/GRAPH to create HTML and graph output which you can display via a web browser.
| Type: | Sample |
| Topic: | Third Party ==> Output ==> Device Drivers ==> GIF, JPEG, PNG SAS Reference ==> ODS (Output Delivery System) Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Maps SAS Reference ==> Procedures ==> GMAP
|
| Date Modified: | 2005-08-27 03:03:24 |
| Date Created: | 2005-05-23 14:16:02 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |