Turn on suggestions

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

Showing results for

- Home
- /
- Programming
- /
- Graphics
- /
- ods Graphs - can observations numbers shown on plot be made legible?

Options

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

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 04-26-2017 05:52 PM
(1549 views)

Hi,

Apologies if this topic has already been covered, but I've had a search across the forum and havn't found a resolution.

I've generated some plots of residuals, using ods graphics.

There are a number of potentially influential points plotted on the outputted graphs, but because the dataset is large (c.10k observations) the observation numbers are stacked on top of one another, and I consequently can't read them.

Is there some way to either drill into points of interest, zoom into the graph or to increase the resolution of the graph to a point that makes the observation numbers legible?

I'm using base SAS 9.2, but should mention that it's remotely hosted, so i've got limitations on being able to install any 3rd party graphing packages that might assist (I read about using Editable Graphics by calling SGE=ON option with LISTING, but then I wasn't able to open the editable files that were produced)

Code i've used to generate the graphs currently:

```
/* Residuals & Influential Statistics: OfferHolderTRAIN */
ods graphics on;
proc logistic data= OfferHolderTRAIN plots(unpack label)=
(dfbetas influence leverage phat dpc);
CLASS Comms_Engagement/PARAM=REF DESCENDING;
MODEL Applicant_Enrolled(EVENT='1')= Comms_Engagement Offer_Place_email_Opened Offer_Place_email_Clked;
run;
ods graphics off;
quit;
```

Example below of the issue I have trying to read the observation numbers:

Greatly apprecite any guidance.

R,

Jon

- Tags:
- ods

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi @ballardw, many thanks for your help. I've tried increasing the size of the plot area as you suggest, but this unfortunately doesn't make the observation numbers any more legible. I also tried increasing the resolution to 300dpi, but again this made no difference (when I tried to increase both the size and the resolution simultaneous, it crashed SAS).

It just occurs that maybe i'll try sampling just 500 observations from my data set, and see if plotting this subset recreates the same outliers

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You may have some luck by saving the appropriate data and routing that to another graphics procedure where you have more control that in the logistics procedure. But if that graph is supposed to contain 10K+ observations that kind of apparent cluster density may require some work.

If you have an area of the data of interest you could WHERE clause in SGPLOT to display values only within a given range for the values such as

where difference > 4 and probability le 0.1;

So fewer records are displayed.

Another option may be to make the graphics area huge with an ODS graphics statement:

ods graphics / height=24in width=24in;

would make a 24 by 24 inch result. I don't know how large you mayhave to make things if your clusters of values are close to read them, and may not be even possible.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi @ballardw, many thanks for your help. I've tried increasing the size of the plot area as you suggest, but this unfortunately doesn't make the observation numbers any more legible. I also tried increasing the resolution to 300dpi, but again this made no difference (when I tried to increase both the size and the resolution simultaneous, it crashed SAS).

It just occurs that maybe i'll try sampling just 500 observations from my data set, and see if plotting this subset recreates the same outliers

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

That's improved it- reducing the number of observations in a smaller sample has enabled me to identify some of the outliers.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Good reasoning.

Shortly after my last post I started thinking a sample may work but I wasn't sure if your request was actually to identify ALL outliers or not.

**SAS Innovate 2025** is scheduled for May 6-9 in Orlando, FL. Sign up to be **first to learn** about the agenda and registration!

How to Concatenate Values

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.