Sample 24903: Create a block map using SHAPE=
goptions reset=all;
/* Create the population data set for Idaho */
data popdata;
state=16;
input county pop99;
datalines;
1 280794
3 4546
5 78641
7 7033
9 8738
11 47036
13 19541
15 5839
17 36437
19 94927
21 9949
23 3147
25 853
27 116441
29 7614
31 22776
33 934
35 9429
37 3836
39 19614
41 10322
43 12351
45 15052
47 13429
49 16135
51 20881
53 17760
55 102833
57 36240
59 7816
61 3921
63 3979
65 25947
67 23199
69 39041
71 3603
73 9212
75 20619
77 9057
79 12901
81 5330
83 63698
85 9352
87 9475
;
/* Create a format to define the population ranges */
proc format;
value popfmt low-100000 = 'Up to 100,000'
100001-200000 = '100,000 - 200,000'
200001-high = 'Over 200,000';
run;
/* Project the map data set for Idaho */
proc gproject data=maps.counties out=idahocty;
where state=16;
id state county;
run;
title1 h=2 f=swissb 'Idaho, Population by County';
/* Define the patterns for the blocks */
pattern1 value=solid color=blue;
pattern2 value=solid color=green;
pattern3 value=solid color=red;
/* Define the pattern for the map surface */
pattern4 value=msolid color=cyan;
legend label=('Population for 1999');
/* Create the map of population by county. */
proc gmap data=popdata map=idahocty all;
/* Format the population variable */
format pop99 popfmt.;
id state county;
/* Use the SHAPE= option to specify a hexagon */
block pop99 / discrete coutline=black shape=hexagon
cblkout=black blocksize=4 legend=legend1;
run;
quit;

This sample uses the SHAPE= option to specify the shape to be used for blocks in a block map.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GMAP Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Maps ==> Special Maps
|
| Date Modified: | 2005-08-31 03:03:07 |
| Date Created: | 2004-11-11 11:07:58 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |