Title: XY Plots Using GPLOT Where the Plot Symbol is the Value of a Third Variable, Z
1X-Y Plots Using GPLOT Where the Plot Symbol is
the Value of a Third Variable, Z
- David Oesper
- Iowa SAS Users Group - April Meeting
- April 8, 1999
2 X-Y Plots Using PROC GPLOT Where the Plot
Symbol is the Value of a Third Variable, Z
data plotdata input xvar yvar
zvar / xvar average parking lot
illumination level in footcandles / / yvar
minimum parking lot illumination level in
footcandles / / zvar location / label
xvar'Average Illumination (fc)' label
yvar'Minimum' cards / Ames locations
/ 7.4 4.3 T / Target / 5.5 4.6 L /
Lowe's / 3.6 2.5 H / Hy Vee East / 2.2
1.6 K / K-Mart / 1.9 0.4 O / Old Target
/ 1.5 1.4 N / DOT North Annex / 1.2 0.8
W / Wal-Mart / 0.6 0.4 D / DOT East Lot
/ run
3data anno length function 8 / size
size of your plot symbols (zvar) / retain
xsys ysys '2' size 1.25 position '5' when 'a'
set plotdata function'label' xxvar
yyvar textzvar run axis1
offset(5,5)pct axis2 offset(5,5)pct /
inone means produce a scatter plot (unconnected
points) / / vnone means do not produce a plot
symbol -- annotate will do this / symbol inone
vnone / landscape paper orientation for x-y
plot / goptions ftextswiss rotatelandscape pr
oc gplot dataplotdata plot yvarxvarzvar /
annoanno vaxisaxis1 haxisaxis2 nolegend
title 'Minimum vs. Average Illumination Levels
for Several Parking Lots' run quit
4(No Transcript)
5(No Transcript)
6 X-Y Plots Using PROC GPLOT Where the Plot
Symbol is the Value of a Third Variable, Z,
which is a Character Variable of Length 2 or
more
data worktown set
sasuser.worktown / use this statement to zoom
in on a portion of the graph / / where
1000ltpoplt10000 and eitgt50 / run data
anno length function 8 retain xsys ysys
'2' size 0.50 position '5' when 'a' set
worktown function'label' xpop
yeit texttrim(town) run
7axis1 offset(5,5)pct axis2 offset(5,5)pct sym
bol inone vnone repeat999 goptions
rotatelandscape targetwinprtc proc gplot
dataworktown plot eitpoptown / annoanno
vaxisaxis1 haxisaxis2 nolegend title1
'Percentage of Workers Employed in the Town They
Live In' title2 'Employed in Town (EIT) vs.
Population (POP) -- 1990 Census Data' run
quit
8(No Transcript)
9(No Transcript)
10(No Transcript)
11(No Transcript)