legend question

Accepted Solution Solved
Reply
Contributor kds
Contributor
Posts: 31
Accepted Solution

legend question

HI,

Is it possible to suppress part of a legend..

suppose if i have 3 variables(a,b,c) to be displayed as lines:

plot  ( a b  c ) * x / overlay   legend;

then , can i show only 'a' and 'b' in legend and suppress 'c'  ???

Thanks

KD


Accepted Solutions
Solution
‎11-01-2012 04:22 PM
PROC Star
Posts: 7,468

Re: legend question

Can you take advantage of the method shown at: http://support.sas.com/kb/46/723.html

View solution in original post


All Replies
Super User
Posts: 11,343

Re: legend question

Which procedure are you using to create the plot? Syntax used might also be helpful in answering your question.

Contributor kds
Contributor
Posts: 31

Re: legend question

It is PROC GPLOT

proc gplot data=ds1;

     plot (a b c) * x / overlay legend;

     plot2 (m) * x /  legend;

     run;

quit;

Note I can't move variable 'a' & 'b'  to plot2 (as   a, b, c are totally different as compared to 'm')

Also if I use GBARLINE  ,

proc gbarline data=ds1;

     bar x/ sumvar=m    raxis=axis1 maxis=axis2 legend;

      plot / sumvar=a     axis=axis3  legend;

      plot / sumvar=c;

      run;

quit;

     For GBARLINE, if I use legend for any one of the PLOT, then legend displays all the plots sumvar...

Solution
‎11-01-2012 04:22 PM
PROC Star
Posts: 7,468

Re: legend question

Can you take advantage of the method shown at: http://support.sas.com/kb/46/723.html

Contributor kds
Contributor
Posts: 31

Re: legend question

Thank you Arthur.   I am able to suppress part of a legend!!   Smiley Happy   

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 250 views
  • 0 likes
  • 3 in conversation