Sample 25559: Specifying response levels in a block map using PROC GMAP
This sample is from the "SAS/GRAPH Software: Reference, Version 8", Volume 2, Chapter 19.
For additional information on the sample refer to this book.
/*+-------------------------------------------------------------+
| S A S S A M P L E L I B R A R Y |
| |
| NAME: GMPLEVEL |
| TITLE: GMPLEVEL-Specifying Response Levels in a Block Map |
| PRODUCT: GRAPH |
| SYSTEM: ALL |
| KEYS: GRAPHICS MAPS GMAP PATTERN LEGEND |
| PROCS: GMAP |
| DATA: INTERNAL |
| |
| SUPPORT: GRAPHICS STAFF UPDATE: |
| REF: SAS/GRAPH REFERENCE GUIDE |
| MISC: EDIT AND UNCOMMENT THE LIBNAME STATEMENTS |
| IF THE LIBREFS HAVE NOT BEEN DEFINED. |
+-------------------------------------------------------------+*/
/* Define the libref maps */
*libname maps 'SAS-MAPS-library';
/* Set the graphics environment */
goptions reset=all gunit=pct border cback=white
colors=(black blue green red)
ctext=black ftext=swiss htitle=6 htext=3;
/* Create the SITES data set */
data sites;
length stcode $ 2;
input region stcode $ sites;
state=stfips(stcode);
datalines;
6 AR 12
10 AK 7
4 AL 12
9 AZ 10
9 CA 90
8 CO 15
1 CT 15
3 DE 18
4 FL 52
4 GA 15
9 HI 4
7 IA 16
10 ID 8
5 IL 38
5 IN 30
7 KS 10
4 KY 16
6 LA 15
1 MA 30
3 MD 13
1 ME 12
5 MI 72
5 MN 30
7 MO 22
4 MS 1
8 MT 8
4 NC 22
8 ND 0
7 NE 10
1 NH 18
2 NJ 105
6 NM 9
9 NV 1
2 NY 78
5 OH 34
6 OK 10
10 OR 10
3 PA 100
1 RI 12
4 SC 26
8 SD 2
4 TN 14
6 TX 26
8 UT 12
3 VA 25
1 VT 8
10 WA 49
5 WI 40
3 WV 6
8 WY 3
;
/* Define titles and footnotes for map */
title1 'Hazardous Waste Site Installations (1997)';
footnote1 j=r 'GMPLEVEL';
/* Define pattern colors for blocks */
pattern1 value=solid color=lime;
pattern2 value=solid color=cyan;
pattern3 value=solid color=green;
pattern4 value=solid color=blue;
pattern5 value=solid color=lipk;
pattern6 value=solid color=red;
pattern7 value=solid color=gray;
pattern8 value=solid color=black;
/* Define pattern for map areas */
pattern9 value=mempty color=black repeat=50;
/* Define legend characteristics */
legend1 value=(j=l)
label=('Number' j=l 'of Sites:'
position=(middle left))
frame;
/* Display the block map */
proc gmap map=maps.us data=sites;
id state;
block sites / shape=cylinder
legend=legend1
levels=8
xview=0.75
zview=5;
run;
quit;

This example uses LEVELS= to specify the number of response levels for the blocks. Eight PATTERN statements explicitly define a color for each of these response levels.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GMAP Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Maps
|
| Date Modified: | 2005-08-27 03:03:23 |
| Date Created: | 2005-05-23 14:15:31 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | 8 TS M0 | n/a |