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

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

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

Browse our catalog!

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