turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- BI
- /
- Enterprise Guide
- /
- How to make multiple plots (y*x1, y*x2, etc.) in S...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-08-2015 05:41 PM

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.

Accepted Solutions

Solution

05-08-2015
06:11 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-08-2015 06:11 PM

Proc Gplot can do this.

proc gplot data=plotdata;

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

or

plot y*(x variable list);

run;

quit;

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-08-2015 05:57 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-08-2015 06:05 PM

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.

Solution

05-08-2015
06:11 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-08-2015 06:11 PM

Proc Gplot can do this.

proc gplot data=plotdata;

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

or

plot y*(x variable list);

run;

quit;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-15-2015 10:53 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-09-2015 02:45 AM

How about BY statement ?