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
- /
- How to include >200 midpoints for axis1 in GCHART

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

03-03-2016 11:28 AM

I can plot 125 midpoint nicely with this code below (SAS 9.2). When data piont go up to 262, I got the error massage. Do any one know a solution?
proc gchart data=final anno=anno1;
where arm=1;
vbar count/ discrete sumvar=chg ascending noframe raxis=axis1 maxis=axis2 width=.2 space=0.4;
run;
quit;
LOG: ERROR: There were 262 midpoints generated from the data. Specify levels=all to display the graph.

Accepted Solutions

Solution

03-04-2016
11:29 AM

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

Posted in reply to Anna_h

03-04-2016 11:15 AM

I did a test and it seems that 200 is the limit for Gchart with discrete VBAR.

The Needleplot doesn't have a limit though the display size may mean that there isn't much visible space between the vertical lines.

Here is a very brief example:

```
data needle;
do xvar = 1 to 400;
yvar = abs(200-xvar);
output;
end;
run;
ods graphics on;
proc sgplot data=needle;
needle x=xvar y=yvar /
;
run;
ods graphics off;
```

Needleplot would require presummarizing data but I seldom used gchart to do the summaries anyway as I often needed to provide tables as well as charts.

All Replies

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

Posted in reply to Anna_h

03-03-2016 11:43 AM - edited 03-03-2016 11:46 AM

As the error says include LEVELS=ALL in the options to the VBAR.

For legibility you may need to increase the space available for your graphics output.

Alternatively you might investigate PROC SGPLOT with a NEEDLEPLOT though that might require presummarizing the data before plotting.

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

Posted in reply to Anna_h

03-03-2016 10:29 PM

Helpful suggestion thank you! I will try. By the way, what is the number limit for gchart using discrete, or we can change setting somewhere?

Solution

03-04-2016
11:29 AM

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

Posted in reply to Anna_h

03-04-2016 11:15 AM

I did a test and it seems that 200 is the limit for Gchart with discrete VBAR.

The Needleplot doesn't have a limit though the display size may mean that there isn't much visible space between the vertical lines.

Here is a very brief example:

```
data needle;
do xvar = 1 to 400;
yvar = abs(200-xvar);
output;
end;
run;
ods graphics on;
proc sgplot data=needle;
needle x=xvar y=yvar /
;
run;
ods graphics off;
```

Needleplot would require presummarizing data but I seldom used gchart to do the summaries anyway as I often needed to provide tables as well as charts.

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

Posted in reply to Anna_h

03-04-2016 11:30 AM

Thanks a lot!