Help using Base SAS procedures

sgplot legend with lines and markers

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

sgplot legend with lines and markers

Hello All,

I'm using proc sgplot with 'scatter' and 'series' as statements and 'group' option in both statements.

I would like to have a legend like the one in the attached file. 

Any suggestion please?


Accepted Solutions
Solution
‎12-07-2017 11:19 AM
SAS Super FREQ
Posts: 502

Re: sgplot legend with lines and markers

proc sgplot data=sashelp.class;
   series y=age x=height / markers group=sex;
   run;

Just use a SERIES statement and make the markers through it.

View solution in original post


All Replies
Solution
‎12-07-2017 11:19 AM
SAS Super FREQ
Posts: 502

Re: sgplot legend with lines and markers

proc sgplot data=sashelp.class;
   series y=age x=height / markers group=sex;
   run;

Just use a SERIES statement and make the markers through it.

☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 186 views
  • 0 likes
  • 2 in conversation