Sample 45772: Create a pie chart using the Graph Template Language (GTL)
This sample uses the SAS® 9.3 PIECHART statement in the Graph Template Language (GTL) to create a pie chart.
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 SAS® 9.3 PIECHART statement in the Graph Template Language (GTL) to create a pie chart.
proc template;
define statgraph piechart;
begingraph;
entrytitle "Creating a Pie Chart of Automobile Makes";
layout region;
piechart category=make / datalabellocation=inside dataskin=sheen
categorydirection=clockwise start=180
othersliceopts=(type=percent percent=5 label="Other Makes");
endlayout;
endgraph;
end;
/* Define the style for the colors of the pie slices and the outline */
define style mystyle;
parent=styles.watercolor;
style graphoutlines from graphoutlines / contrastcolor=gray55;
end;
run;
ods listing style=mystyle;
proc sgrender data=sashelp.cars template=piechart;
where origin='Asia';
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.
This sample uses the SAS® 9.3 PIECHART statement in the Graph Template Language (GTL) to create a pie chart.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> SGRENDER
|
Date Modified: | 2012-03-19 09:55:25 |
Date Created: | 2012-02-23 09:11:21 |
Operating System and Release Information
SAS System | Base SAS | Aster Data nCluster on Linux x64 | 9.3 TS1M0 | |
DB2 Universal Database on AIX | 9.3 TS1M0 | |
DB2 Universal Database on Linux x64 | 9.3 TS1M0 | |
Greenplum on Linux x64 | 9.3 TS1M0 | |
Netezza TwinFin 32bit blade | 9.3 TS1M0 | |
Netezza TwinFin 32-bit SMP Hosts | 9.3 TS1M0 | |
Netezza TwinFin 64-bit S-Blades | 9.3 TS1M0 | |
Netezza TwinFin 64-bit SMP Hosts | 9.3 TS1M0 | |
Teradata on Linux | 9.3 TS1M0 | |
z/OS | 9.3 TS1M0 | |
Z64 | 9.3 TS1M0 | |
Microsoft® Windows® for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 TS1M0 | |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 TS1M0 | |
Windows 7 Professional 32 bit | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 TS1M0 | |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 TS1M0 | |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | |
64-bit Enabled HP-UX | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 TS1M0 | |
HP-UX IPF | 9.3 TS1M0 | |
Linux | 9.3 TS1M0 | |
Linux for x64 | 9.3 TS1M0 | |
Solaris for x64 | 9.3 TS1M0 | |