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

Greetings! I would like to suppress the legend. The "NOAUTOLEGEND" command seems not to be working.

 

Here is practice data and the syntax:

 

data yoga3;
   input ttpbf_graph na tx_group;
datalines;
0 17 1
0 17.5 1
0 16.5 0
0 17 0
1 11 1
1 12 1
1 30 0
1 31 0
2 11 1
2 13 1
2 35 0
2 36 0
4 13 1
4 14 1
4 37 0
4 32 0
;



proc sgplot data= yoga3 NOAUTOLEGEND;
styleattrs datalinepatterns = (shortdash solid)
   datacontrastcolors = (black)  
;
title "Title Title Title";
      vline ttpbf_graph /  response=na   group=tx_group  stat=mean  limits=both  limitstat=stderr  markers;
xaxis display=(nolabel) offsetmin=0.05 offsetmax=0.05 values=(0 to 4 by 1) labelattrs=(size=14) valueattrs=(size=12);
format ttpbf_graph myxaxiss. ;
yaxis label="Label label label" values= (9 to 40 by 5) labelattrs=(size=14) valueattrs=(size=12);
keylegend/title=" ";

run;

Advice welcomed!

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @BalletYoga,

 

Remove the KEYLEGEND statement.

 

The documentation of the NOAUTOLEGEND option says: "This option has no effect if you specify a KEYLEGEND statement."

View solution in original post

2 REPLIES 2
BalletYoga
Obsidian | Level 7

Here is what the graph looks like with the above data and syntax:

 

Example.png

FreelanceReinh
Jade | Level 19

Hello @BalletYoga,

 

Remove the KEYLEGEND statement.

 

The documentation of the NOAUTOLEGEND option says: "This option has no effect if you specify a KEYLEGEND statement."

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 323 views
  • 2 likes
  • 2 in conversation