Sample 56938: Display special symbols as axis values using PROC FORMAT with the Graph Template Language (GTL)
The sample code on the Full Code tab uses PROC FORMAT and Unicode values to create axis values that contain special symbols. The graph is produced using the Graph Template Language (GTL) with PROC SGRENDER. This sample requires the third maintenance release of SAS® 9.4 (TS1M3).
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.
The sample code below uses PROC FORMAT and Unicode values to create axis values that contain special symbols. The graph is produced using the Graph Template Language (GTL) with PROC SGRENDER. This sample requires the third maintenance release of SAS 9.4 (TS1M3).
proc format;
value agefmt
20-30 = "20 (*ESC*){unicode '2264'x} 30"
31-40 = "31 (*ESC*){unicode '2264'x} 40"
41-50 = "41 (*ESC*){unicode '2264'x} 50"
51-60 = "51 (*ESC*){unicode '2264'x} 60"
61-70 = "61 (*ESC*){unicode '2264'x} 70";
run;
proc template;
define statgraph boxes;
begingraph / datacolors=(red green purple orange cyan) backgroundcolor=vpav;
entrytitle 'Cholesterol Level by Age Range';
layout overlay / wallcolor=pwh;
boxplot x=AgeAtStart y=cholesterol / group=AgeAtStart;
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.heart template=boxes;
format AgeAtStart agefmt.;
run;
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.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGRENDER Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Statistical Graph Enhancements
|
Date Modified: | 2015-11-04 16:04:31 |
Date Created: | 2015-10-27 15:49:05 |
Operating System and Release Information
SAS System | Base SAS | HP-UX IPF | 9.4 TS1M3 | |
64-bit Enabled Solaris | 9.4 TS1M3 | |
64-bit Enabled AIX | 9.4 TS1M3 | |
Windows 7 Ultimate x64 | 9.4 TS1M3 | |
Windows 7 Ultimate 32 bit | 9.4 TS1M3 | |
Windows 7 Professional x64 | 9.4 TS1M3 | |
Windows 7 Professional 32 bit | 9.4 TS1M3 | |
Windows 7 Home Premium x64 | 9.4 TS1M3 | |
Windows 7 Home Premium 32 bit | 9.4 TS1M3 | |
Windows 7 Enterprise x64 | 9.4 TS1M3 | |
Windows 7 Enterprise 32 bit | 9.4 TS1M3 | |
Microsoft Windows Server 2012 Std | 9.4 TS1M3 | |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M3 | |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M3 | |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M3 | |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M3 | |
Microsoft Windows Server 2008 R2 | 9.4 TS1M3 | |
Microsoft Windows Server 2008 | 9.4 TS1M3 | |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8.1 Pro | 9.4 TS1M3 | |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M3 | |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8 Pro x64 | 9.4 TS1M3 | |
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M3 | |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M3 | |
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M3 | |
Microsoft® Windows® for x64 | 9.4 TS1M3 | |
z/OS 64-bit | 9.4 TS1M3 | |
z/OS | 9.4 TS1M3 | |
Linux for x64 | 9.4 TS1M3 | |
Solaris for x64 | 9.4 TS1M3 | |