- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is there any way to increase the max number of groups for groups= option for BARCHART in the GTL? I seem to have hit the limit with 1092 groups. Interestingly proc sgplot doesn't seem to have the same limit.
R
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ODS Graphics limits the number of discrete values or groups to 1000 to prevent runaway jobs, where a group or category role may be assigned a column (unintionally) that has a very large number of unique values. These are controlled by the DISCRETEMAX and GROUPMAX options on the ODS GRAPHICS statement. You can set these values to a higher level for your needs.
ods graphics / groupmax=1001;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ODS Graphics limits the number of discrete values or groups to 1000 to prevent runaway jobs, where a group or category role may be assigned a column (unintionally) that has a very large number of unique values. These are controlled by the DISCRETEMAX and GROUPMAX options on the ODS GRAPHICS statement. You can set these values to a higher level for your needs.
ods graphics / groupmax=1001;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for this. I new there must be an option somewhere to increase this but its not mentioned in the error message or in the documentation for groups= . The only mention is in regard to increasing the memory available for ODS graphics. Also what is the limit for groups= in proc sgplot?
R
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't expect any difference at all for this scatter plot use case. I just ran this code for SG and GTL, and I got the exact same log message.
data scatter; do g=1 to 1001; x=ranuni(2); y=ranuni(2); output; end; run; ods html close;
ods listing;
proc sgplot data=scatter tmplout='c:\max.sas'; scatter x=x y=y / group=g; run; proc template; define statgraph max; begingraph; layout overlay; scatterplot x=x y=y / group=g; endlayout; endgraph; end; run; /*ods graphics / groupmax=1001;*/ proc sgrender data=scatter template=max; run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Looks like I had excluded some obs which meant the no groups dropped below 1000
R
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Sanjay for what a simple but hard found solution! I Have been searching the SAS Manual for a whole day but only found your answer here!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
We are always looking to improve the documentation. I will update the GROUP= option in the next edition of the SAS ODS Graphics Procedures Guide with this information. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Normally, the software will write a note to the log indicating when this has happened, and the name of the option you can use to fix the issue. In this case the note is not logged, sorry about that. I have opened a defect.