Sample 24860: Create symbols with solid instead of empty fills
/* The Annotate facility is used to place solid filled */
/* symbols on a graph generated by PROC G3D. */
/* Set graphics environment */
goptions reset=all ctext=black colors=(black) border;
/* Create input data set, ONE */
data one;
do i=1 to 10;
x=ranuni(0);
y=ranuni(0);
z=ranuni(0);
output;
end;
run;
/* Create data set, TWO */
proc g3grid data=one out=two;
grid y*x=z;
run;
quit;
/* Create annotate data set to draw the 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='red';
size=3;
position='5';
output;
end;
if _n_>49 then do;
function='label';
style='marker';
text='V';
x=x;
y=y;
z=z;
color='blue';
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='red';
end;
if _n_>49 then do;
shapeval='star';
colorval='blue';
end;
run;
/* Define title */
title 'Random Number Generator';
/* Create graph */
proc g3d data=three;
scatter y*x=z / size=.0001 annotate=anno
shape=shapeval color=colorval;
run;
quit;
The Annotate facility is used to place solid filled symbols on a graph generated by PROC G3D.
| 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 |