Previous Page | Next Page

The G3D Procedure

Example 5: Generating a Scatter Plot with Modified Shapes


Procedure features:

Scatter statement

COLOR=

SHAPE=

DATA Step

NOTE statement

Sample library member: GTDSHAPA

[Scatter Plot with Shapes and Colors]

This scatter plot modifies the results of measuring the petal length, petal width, and sepal length for the flowers of three species of irises by:

 Note about code
goptions reset=all border;
 Note about code
title1 "Iris Species Classification";
title2 "Physical Measurement";
title3 "Source: Fisher (1936) Iris Data";
footnote1 j=l "Sepal Width not Shown";
 Note about code
data=iris;
  set sashelp.iris;
  length color shape $8.;
  if species="Setosa" then do; shape="club"; color="blue"; end 
  if species="Versicolor" then do; shape="diamond"; color="red"; end;
  if species="Virginica" then do; shape="spade"; color="green"; end'
run;
 Note about code
proc g3d data=iris;
note j=r f="Albany AMT/bo" "Species:  : c=green "Virginica   "
         j=r    c=red "Versicolor      "
         j=r    c=blue "Setosa      ";
 scatter PetalLength*PetalWidth=SepalLength/
      color=color
      shape=shape;
run;
quit;

Previous Page | Next Page | Top of Page