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 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
  • 14215 views
  • 2 likes
  • 2 in conversation