Sample 25597: Rotate plot symbols through the colors list using a SYMBOL statement with PROC GPLOT
This example specifies a plot symbol on a SYMBOL statement with PROC GPLOT to rotate the symbol through the colors list.
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 code specifies a plot symbol on a SYMBOL statement with PROC GPLOT to rotate the symbol through the colors list.
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.
/* Set the graphics environment */
goptions reset=all border cback=white htitle=12pt;
/* Create the data set BACTERIA */
data bacteria;
input temp div mass life @@;
datalines;
10 3 10 1 20 22 46 0 30 23 20 9 40 42 16 16 50 33 20 6
10 1 11 2 20 01 44 2 30 21 31 10 40 41 14 12 50 31 21 7
10 4 14 3 20 13 32 4 30 24 34 9 40 43 22 14 50 34 24 2
10 2 09 2 20 12 40 6 30 26 29 8 40 42 20 16 50 26 29 4
10 3 08 3 20 09 33 8 30 24 38 11 40 39 23 18 50 34 38 2
10 2 09 1 20 08 38 1 30 25 47 14 40 38 18 12 50 43 44 1
10 4 10 3 20 15 42 3 30 29 30 14 40 35 22 14 50 39 20 8
10 3 11 2 20 20 36 5 30 28 31 9 40 40 26 15 50 28 31 0
10 2 15 3 20 19 35 7 30 26 25 11 40 39 25 17 50 26 15 4
10 4 12 3 20 14 33 2 30 27 22 8 40 36 23 12 50 27 22 3
10 4 13 3 20 12 37 4 30 26 33 9 40 42 27 14 50 26 33 5
10 2 17 1 20 10 39 6 30 25 43 13 40 40 29 16 50 35 43 7
10 3 14 1 20 08 38 4 30 28 34 8 40 38 28 14 50 28 34 4
10 1 12 1 20 06 41 2 30 26 32 14 40 36 21 12 50 21 22 2
10 1 11 4 20 09 32 2 30 27 31 8 40 39 22 12 50 37 31 2
10 1 20 2 20 11 32 5 30 25 32 16 40 41 22 15 50 35 22 5
10 4 09 2 20 13 39 1 30 28 29 12 40 43 19 15 50 28 29 1
10 3 02 2 20 09 32 5 30 26 32 9 40 39 22 15 50 36 22 5
10 2 05 3 20 07 35 4 30 24 35 15 40 37 25 14 50 24 35 4
10 3 08 1 20 05 38 6 30 23 28 9 40 35 28 16 50 33 28 6
;
run;
proc sort data= bacteria;
by temp;
run;
/* Add a title to the graph */
title1 'Effect of Temperature on the Number'
j=c 'and Size of Bacterial Divisions';
/* Define the symbol shape */
symbol1 height=1.5 value=dot;
/* Define axis characteristics */
axis1 label=('Size (in Angstroms)') minor=none;
axis2 label=('Divisions') minor=none;
/* Define legend characteristics */
legend1 label=(position=(top left)
'Temperature' j=l '(Celsius)')
;* shape=symbol(4,2);
/* Create the graph */
proc gplot data= bacteria;
plot div*mass=temp / haxis=axis1
vaxis=axis2
legend=legend1;
run;
quit;
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 example specifies a plot symbol on a SYMBOL statement with PROC GPLOT to rotate the symbol through the colors list.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Symbols/Interpolation
|
Date Modified: | 2005-09-22 03:03:13 |
Date Created: | 2005-05-23 14:17:59 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.1 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M0 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Professional | 9.1 TS1M0 | |
Microsoft Windows NT Workstation | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | |
Microsoft Windows XP Professional | 9.1 TS1M0 | |
64-bit Enabled AIX | 9.1 TS1M0 | |
64-bit Enabled HP-UX | 9.1 TS1M0 | |
64-bit Enabled Solaris | 9.1 TS1M0 | |
HP-UX IPF | 9.1 TS1M0 | |
Linux | 9.1 TS1M0 | |
OpenVMS Alpha | 9.1 TS1M0 | |
Tru64 UNIX | 9.1 TS1M0 | |