Sample 35840: How to change the color of background areas and grid lines for ODS GRAPHICS output
This sample demonstrates how to change the following style elements for ODS Statistical Graphics output: the background color outside the axis area, the background color inside the axis area, and the color of the grid lines.
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 demonstrates how to change the following style elements for ODS Statistical Graphics output: the background color outside the axis area, the background color inside the axis area, and the color of the grid lines.
proc template;
define style styles.defstyle;
parent=styles.default;
style body from body /
background = white;
class graphgridlines /
contrastcolor=black;
class graphbackground /
color=green;
class graphwalls /
color=tan;
end;
run;
proc sort data=sashelp.class out=temp;
by weight;
run;
ods html file='gridsgplot.html' path='.' style=defstyle;
ods graphics / reset width=600px height=400px imagename="gridsgplot" imagefmt=gif;
proc sgplot data=temp;
series x=weight y=height;
yaxis grid;
run;
quit;
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 demonstrates how to change the following style elements for ODS Statistical Graphics output: the background color outside the axis area, the background color inside the axis area, and the color of the grid lines.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGPLOT
|
Date Modified: | 2009-05-18 15:36:13 |
Date Created: | 2009-05-07 12:19:10 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Microsoft Windows XP Professional | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | |
64-bit Enabled HP-UX | 9.2 TS1M0 | |
64-bit Enabled Solaris | 9.2 TS1M0 | |
HP-UX IPF | 9.2 TS1M0 | |
Linux | 9.2 TS1M0 | |
Linux for x64 | 9.2 TS1M0 | |
OpenVMS on HP Integrity | 9.2 TS1M0 | |
Solaris for x64 | 9.2 TS1M0 | |