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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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