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
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- Changing minimum and Maximum axes for ODS graphica...

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
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-22-2013 03:46 PM

How is this done? I'd like to use the ODS output to exhibit a simple forecast from a polynomial regression. Id like both axis minimums to be 0, but the ODS output fits it to the data.

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

Posted in reply to Wolfram

04-22-2013 03:59 PM

You have to find the template and modify it.

It isn't as scary as it seems at first .

http://support.sas.com/rnd/app/ODSGraphics/TipSheet_GraphTemplateModification.pdf

EDIT: I should say, one way...there are possibly others.

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

Posted in reply to Wolfram

04-22-2013 04:15 PM

Thanks Reeze, I'm looking through that and not really seeing how to get it done. Though it would seem the ODS output is not what im looking for, since it only seems to plot a single X against the Y.

The code for the regression I'm trying to plot is as follows:

proc reg data=revreg2;

model revenue=xr2 XR /white spec;

run;

So basically I want my Y to be revenue and my X to be xr2 + XR. What would be the best way to do this graphically, with confidence bands? And with being able to control the max and min on the axes?

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

Posted in reply to Wolfram

04-22-2013 04:24 PM

If you can extract the data from proc reg using an output or out dataset you can plot it manually using PROC SGPLOT.

Then you'll have full control. Not sure where/how you'll get the confidence bands though.

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

Posted in reply to Wolfram

04-22-2013 04:40 PM

Set ODS TRACE ON and find the template REG procedure to create the graph. Then, in the template find the LAYOUT OVERLAY statement. Set the following option.

LAYOUT OVERLAY / XAXISOPTS=(LINEAROPTS=(VIEWMIN=0));

If using Reeza's suggestion, use SGPLOT procedure to render the plot. Use XAXIS MIN=0 to get the right axis scaling.