Click here to see the SAS code. 
Click here to see the example. 

I use the maps.counties rather than maps.uscounty,
so that I can annotate some circles/grids at exact longitude
and latitude locations.

I create an annotate data set containing circles (180-degree "pies")
and I fill these pies with hashmark patterns using the "pie chart"
patterns in the annotate's 'style' variable using the code below.
By using hash-mark patterns, you can still see the land areas 
through/behind the pies.  Also, this makes it easy to see the intersection
of multiple pies in the same area.

   if pattern=1 then style='p2n45';
   else if pattern=2 then style='p2x45';

I combine the annotate and map data sets, and "gproject" them,
and then separate them again, and draw them using sas/graph's
"proc gmap".  Notice that the different areas of the map have
html charttip/flyover-text, so you can see the data values
for each area.

I use gmap's legend for the color chicklets, and hardcode my own
custom text labels for each.  I then use annotate to make a legend
for the hashmark/pie's, and some other text up in the title area.
By annotating this title-like text, instead of using the title statement,
I am able to print it in the same area as the map, thereby making better
use of all the available white space.

Also, I use one more annotate trick -- I use annotate to draw the 
dark/heavy outlines around the groups of areas in the map.  Gmap does
not have an automated way to do this, so I use annotate.

Back to Samples Index