BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RobF
Quartz | Level 8

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.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Proc Gplot can do this.

proc gplot data=plotdata;

     plot (y-variable list)*(x variable list);

or

     plot y*(x variable list);

run;

quit;

View solution in original post

5 REPLIES 5
Reeza
Super User

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

RobF
Quartz | Level 8

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.

ballardw
Super User

Proc Gplot can do this.

proc gplot data=plotdata;

     plot (y-variable list)*(x variable list);

or

     plot y*(x variable list);

run;

quit;

RobF
Quartz | Level 8

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1658 views
  • 1 like
  • 4 in conversation