BookmarkSubscribeRSS Feed
JB_DataAnalyst
Obsidian | Level 7

Hi,

How can i remove the "tag" in the legend?

SGPlot37.png

 

I tried already setting label tag=" "; but it didn't worked

 

Thanks

4 REPLIES 4
DanH_sas
SAS Super FREQ

Assuming this is SGPLOT, you can set TITLE="" in the KEYLEGEND statement:

 

keylegend / title="";

 

Hope this helps!

Dan

JB_DataAnalyst
Obsidian | Level 7

Thanks Dan,

 

this is the code:

 

proc sgplot data=BladderManagementCount;
Title "Bladder Management";
yaxis label="Percentage(%)" min=0 max=.5;
XAXIS DISPLAY=(NOLABEL);
keylegend / title=" ";
vbar TimePoint / response=pct2 group=tag groupDisplay=cluster datalabel;
run;

 

and this is the output

SGPlot42.pngthe legend disappears

DanH_sas
SAS Super FREQ

Try it this way:

 

proc sgplot data=BladderManagementCount;
Title "Bladder Management";
yaxis label="Percentage(%)" min=0 max=.5;
XAXIS DISPLAY=(NOLABEL);
vbar TimePoint / response=pct2 group=tag groupDisplay=cluster datalabel name="mybar";
keylegend "mybar" / title="";
run;
JB_DataAnalyst
Obsidian | Level 7
AH! It works!! 🙂 Thanks DanH_sas

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 17330 views
  • 2 likes
  • 2 in conversation