BookmarkSubscribeRSS Feed
Fluorite | Level 6

Hi everyone, 
I am trying to create a map using the gmap procedure. I was able to successfully create the map as shown in the attached images. However, the block option allows us to create a 3-D map and the journal I want to publish this in does not accept 3-D graphs. How can I show the counts of the facilities that is shown using the block option in a 2-D format? Basically, how can I incorporate the information coming from two response variables in a choropleth map?Help to change this block into a 2-D mapHelp to change this block into a 2-D map


SAS Employee

In this paper they use GCHART and add a bar chart with VBAR.  Starts on page 12. That might help.


- Peter

SAS Employee

You could also consider using the SGMAP procedure and layering a bubble map on top of a choropleth map background. The result would look something like this:


I would probably actually recommend displaying the same information in two separate choropleth maps: one for % households and one for # of meal programs. Sometimes a simple map does a better job communicating the point, and viewers might find it easier to notice patterns comparing two maps of the same type side-by-side instead of trying to compare a bar and a choropleth map.


Fluorite | Level 6
Not sure how to code for adding the count as bubble (I am new to using PROC GMAP)
I used the following code to get the current map: legend1 label=(f=swissb j=c '% of households who need meals') across=4 down=2 frame position=(top center
legend2 label=(f=swissb j=c 'Number of school meal programs') across=3 down=1 frame position=(bottom center
title h=4 f=swissb 'Availability of meal programs and percentage of households in need';
proc gmap data = ccs2019 ;

id state;
area les_tert/legend=legend1;
block ccs_count/levels=3 legend=legend2 ;
format les_tert les_tert.;
Fluorite | Level 6

@GraphGuy I came across your solution for other graph-related questions. Is this something you can help with? I really would appreciate it.

Meteorite | Level 14

Hypothetically, you could draw bars on a 2d map using annotate (where the bar starts at the center of each state, and the height of the bars is scaled based on the data). I'm not sure it would be a great way to present data, and not sure it would be worth the work.

Super User

Can you show an example of what you want for a 2-d version of your graph?


I would think most understandable might be just a box with the number of school mean programs. Something like this example: only use the number to display instead of the state abbreviation. Use CBOX with CBACK=white to have the numbers appear on a white background for readability and to draw attention. Probably  still need to play with locations for some of the New England states like Connecticut and Rhode Island as may not be room


If you want to overlay a 2-dimensional rectangle then you could create an annotate data set drawing rectangles that look like a 2-d bar at each state.


Or maybe use a fill pattern to represent the bar information

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 5 in conversation