This photo is plot by excel.
How can I make like this by sas?
I try many times but failed!
thanks!
data a17;
input year a1-a9;
cards;
104 4 2 3 2 11 7 3 0 1
105 2 0 4 1 12 6 3 0 0
106 5 2 5 2 8 4 5 1 0
107 3 2 3 1 20 6 3 1 0
;
proc print;run;
See if you can use this as a template
data a17;
input year a1-a9;
cards;
104 4 2 3 2 11 7 3 0 1
105 2 0 4 1 12 6 3 0 0
106 5 2 5 2 8 4 5 1 0
107 3 2 3 1 20 6 3 1 0
;
proc transpose data=a17 out=plot(rename = (col1=a _NAME_=n));
by year;
run;
proc sgplot data = plot;
series x = n y = a / group= year lineattrs=(thickness=3);
styleattrs datacontrastcolors=(blue orange grey gold);
yaxis min = 0 max = 25 grid display=(nolabel);
xaxis display=(nolabel);
run;
Result:
See if you can use this as a template
data a17;
input year a1-a9;
cards;
104 4 2 3 2 11 7 3 0 1
105 2 0 4 1 12 6 3 0 0
106 5 2 5 2 8 4 5 1 0
107 3 2 3 1 20 6 3 1 0
;
proc transpose data=a17 out=plot(rename = (col1=a _NAME_=n));
by year;
run;
proc sgplot data = plot;
series x = n y = a / group= year lineattrs=(thickness=3);
styleattrs datacontrastcolors=(blue orange grey gold);
yaxis min = 0 max = 25 grid display=(nolabel);
xaxis display=(nolabel);
run;
Result:
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.