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;
... View more