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
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;
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;
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
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;
Looks like I had excluded some obs which meant the no groups dropped below 1000
R
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!!
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!
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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.