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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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