For example, I have one dataset as below. Because y and z have different dimensions, I have to use two vertical axis to represent y*x and z*x plots respectively. It is easy to do in excel (please see the attached figure), but how to do it using sas? Thanks!
data mydata;
input x y z;
datalines;
1 550 100
2 500 200
3 450 300
4 400 400
5 350 500
6 300 600
7 250 700
8 200 800
;
run;
symbol1 v=none INTERPOL=join c=blue width=5;
symbol2 v=none INTERPOL=join c=red width=5;
proc gplot data=mydata;
plot y*x
z*x/overlay;
run;
quit;
Change the proc to say:
proc gplot data=mydata;
plot y*x;
plot2 z*x;
run;
quit;
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.