Data visualization with SAS programming

Suppressing variable name in map legend

Accepted Solution Solved
Reply
Contributor
Posts: 20
Accepted Solution

Suppressing variable name in map legend

Hi folks, I am using PROC GMAP to create a map, and I was wondering if anyone knows how I can suppress the variable name in the legend that appears underneath the map. I am using the "matchnum_code" variable to inform the color scheme for the map, but I don't want the name "matchnum_code" showing up next to the legend like it's doing now. Is there an option I can use in the CHORO / statement? I don't want any label for the legend, just the values and the colors they correspond to. Code is posted below. Thanks!

 

PROC GMAP

DATA=CBSA

MAP=CBSA

ANNO=ANNO;

ID NAME;

CHORO matchnum_code

/ DISCRETE ;

FORMAT matchnum_code matchnum.;

RUN;


Accepted Solutions
Solution
‎02-16-2016 03:09 PM
Super User
Posts: 11,105

Re: Suppressing variable name in map legend

To modify behavior of a legend from the default you need to provide a LEGEND statement and tell the program to use it.

 

Legend1 label=none;

 

PROC GMAP

DATA=CBSA

MAP=CBSA

ANNO=ANNO;

ID NAME;

CHORO matchnum_code

/ DISCRETE Legend=Legend1;

FORMAT matchnum_code matchnum.;

RUN;

View solution in original post


All Replies
Solution
‎02-16-2016 03:09 PM
Super User
Posts: 11,105

Re: Suppressing variable name in map legend

To modify behavior of a legend from the default you need to provide a LEGEND statement and tell the program to use it.

 

Legend1 label=none;

 

PROC GMAP

DATA=CBSA

MAP=CBSA

ANNO=ANNO;

ID NAME;

CHORO matchnum_code

/ DISCRETE Legend=Legend1;

FORMAT matchnum_code matchnum.;

RUN;

Contributor
Posts: 20

Re: Suppressing variable name in map legend

That worked great! Thank you! Much appreciated

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 312 views
  • 0 likes
  • 2 in conversation