BookmarkSubscribeRSS Feed
huangchiuhua19
Calcite | Level 5

What can I do so that M is a blue dashed line, F is a red dashed line, and N is a solid black line?
In addition, how to set the style of the line?
Thank you very much for everyone’s helpful replies.

Here is my code and a picture of the result.

 

proc sgplot data=a;
title "Figure 3";
vline pro / response=rt stat=mean markers
group=vio lineattrs=(thickness=4px);
run;

huangchiuhua19_0-1694237966845.png

 

1 REPLY 1
DanH_sas
SAS Super FREQ

Use a Discrete Attributes Map:

 

data map;
retain id "my_id";
length linepattern $ 10;
input value $ linecolor $ linepattern $;
cards;
F red   mediumdash
M blue  shortdash
N black solid
;
run;

data class;
set sashelp.class;
if age > 14 then sex="N";
run;

proc sgplot data=class dattrmap=map;
series x=age y=weight/group=sex attrid=my_id;
run;

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 25. 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
  • 1 reply
  • 383 views
  • 1 like
  • 2 in conversation