BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Batman
Quartz | Level 8

This is the tail end of a program that colors states into two groups and also creates a filled circle around the city of Seattle.  It creates a legend for the two groups of states, however, I would like to add the color for the circle around Seattle to the legend, which comes from the ANNO dataset.   Is there a way to tell SAS to include that in the legend?

 

/* Separate projected data into map and anno datasets */
DATA usmap anno;
SET us48_proj;
IF flag=1 THEN OUTPUT anno;
ELSE OUTPUT usmap;
RUN;

proc format;
value TEC_NAME
1='Group 1'
2='Group 2'
;

TITLE1 "Example";
pattern1 value=msolid color=Yellow;
pattern2 value=msolid color=Brown;
PROC GMAP DATA=usmap MAP=usmap ANNO=anno;
ID ID;
CHORO cat / levels=11 COUTLINE=black MISSING;
FORMAT cat TEC_NAME.;
RUN; QUIT;

1 ACCEPTED SOLUTION

Accepted Solutions
GraphGuy
Meteorite | Level 14

I don't know of a built-in way to add extra things to the official legend in SAS/Graph GMap. I do what you're doing - annotate the extra stuff. Here's an example:

 

https://robslink.com/SAS/democd104/covid_uscounty_snapshots.sas

 

annotate_legend.png

View solution in original post

3 REPLIES 3
GraphGuy
Meteorite | Level 14

I don't know of a built-in way to add extra things to the official legend in SAS/Graph GMap. I do what you're doing - annotate the extra stuff. Here's an example:

 

https://robslink.com/SAS/democd104/covid_uscounty_snapshots.sas

 

annotate_legend.png

Batman
Quartz | Level 8
That is helpful. Is there a way to display the coordinates on the map to I can try to moved the anno items around?
GraphGuy
Meteorite | Level 14

If you use an xsys and ysys value of '3', then the coordinate system for anno is 0-100 in each direction.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 3 replies
  • 917 views
  • 4 likes
  • 2 in conversation