Procedure features: |
AUTOLABEL, HAXIS, LEGEND
|
Data Set |
SASHELP.LAKE
|
Sample library member: |
GCTLABEL
|
This example modifies
Simple Contour to label contour levels with the AUTOLABEL
option. The SYMBOL statement used with the AUTOLABEL option enables you to
customize the attributes of the contour lines and labels.
In this example, SYMBOL1 and SYMBOL7 assign text labels, text fonts,
text height, and text and line color for the first and seventh contour level
lines. SYMBOL2-SYMBOL6 define the text height, and the text and line
color for contour level lines 2-6.
Additionally, the LEGEND statement attributes are modified to reposition
the legend closer to the data.
|
goptions reset=all border; |
|
title1 "Lake Data";
footnote1 j=r "GCTLABEL"; |
|
symbol1 value="DEEP"
color=red
font="Arial Rounded MT Bold"
height=.6;
symbol2 color=green
height=.45;
symbol3 color=blue
height=.45;
symbol4 color=orange
height=.45;
symbol5 color=purple
height=.45;
symbol6 color=magenta
height=.45;
symbol7 value="Shallow"
color=navy
font="Arial Rounded MT Bold"
height=.7; |
|
legend1 position=(right middle)
label=(position=top)
across=1; |
|
axis1 order=(0 to 10 by 2) minor=none; |
|
proc gcontour data=sashelp.lake;
plot length*width=depth/
autolabel=(check=none)
haxis=axis1
legend=legend1
name="GCTLABEL";
run;
quit; |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.