BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
osi814
Obsidian | Level 7

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;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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

4 REPLIES 4
ballardw
Super User

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;

osi814
Obsidian | Level 7

That worked great! Thank you! Much appreciated

Barbara91
Calcite | Level 5

buongiorno, scusate l0intrusione, ma lavorando con SAS ho trovato l'utilizzo di matchnum, ma non so a che cosa faccia riferimento, potreste aiutarmi?

DanH_sas
SAS Super FREQ

Barbara91's question (Italian->English): "Good morning, sorry for the intrusion, but working with SAS I found the use of MATCHNUM, but I do not know what you're referring to, could you help me?"

 

MATCHNUM is just a user-defined format in their program to convert the values of the matchnum_code variable into another form better for readers of the graphics output. You can create these formats using PROC FORMAT.

 

Hope this helps!

Dan

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1221 views
  • 0 likes
  • 4 in conversation