Sample 24860: Create solid filled symbols instead of empty filled symbols with PROC G3D and Annotate
This sample uses PROC G3D with the Annotate facility to place solid filled symbols on a 3D scatter plot.
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 PROC G3D with the Annotate facility to place solid filled symbols on a 3D scatter plot.
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 cback=white border htitle=12pt htext=10pt;
/* Create a sample data set */
data one;
do i=1 to 10;
x=ranuni(0);
y=ranuni(0);
z=ranuni(0);
output;
end;
run;
/* Use G3GRID to create data set TWO */
proc g3grid data=one out=two;
grid y*x=z;
run;
quit;
/* Create an annotate data set to draw the filled symbols */
data anno;
set two;
retain xsys ysys zsys '2' hsys '3';
length color style $8;
if _n_<50 then do;
function='label';
style='marker';
text='U';
x=x;
y=y;
z=z;
color='depk';
size=3;
position='5';
output;
end;
if _n_>49 then do;
function='label';
style='marker';
text='V';
x=x;
y=y;
z=z;
color='libg';
size=4;
position='5';
output;
end;
run;
/* Create data set, THREE */
data three;
length colorval shapeval $8;
set two;
if _n_<50 then do;
shapeval='balloon';
colorval='depk';
end;
if _n_>49 then do;
shapeval='star';
colorval='libg';
end;
run;
/* Add a title to the graph */
title 'G3D output with filled symbols';
/* Create the graph using the ANNO= */
/* option on the SCATTER statement */
proc g3d data=three;
scatter y*x=z / size=.0001 anno=anno
shape=shapeval color=colorval;
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 sample uses PROC G3D with the Annotate facility to place solid filled symbols on a 3D scatter plot.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> G3D
|
Date Modified: | 2005-08-27 03:03:10 |
Date Created: | 2004-11-11 11:07:51 |
Operating System and Release Information
SAS System | SAS/GRAPH | All | n/a | n/a |