Is there a shortcut in SAS EG that allows me to make multiple plots: y*x1, y*x2, y*x3, .... simultaneously without repeating the Tasks->Graph->Scatter Plot->Data point and click routine for each plot?
I'd like to select a chunk of predictor variables and assign them to the horizontal axis, then select the response variable and assign it to the vertical axis, but alas there's a limit of one variable per axis.
Proc Gplot can do this.
proc gplot data=plotdata;
plot (y-variable list)*(x variable list);
or
plot y*(x variable list);
run;
quit;
You could program it using proc sgplot?
proc sgplot data=have;
scatter x=x y=y1;
scatter x=x y=y2;
scatter x=x y=y3;
run;quit;
If you want multiple individual graphs look at SGSCATTER Procedures
Right, I've used sgplot in the past but I have a lot of variables to plot & thought I'd leverage the work with some of the point & click tasks.
Proc Gplot can do this.
proc gplot data=plotdata;
plot (y-variable list)*(x variable list);
or
plot y*(x variable list);
run;
quit;
Ballardw's proc gplot suggestion works fine - it looks like there aren't any options at the moment in SAS EG for a point and click version of this however.
How about BY statement ?
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.