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;
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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.