BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Anna_h
Calcite | Level 5
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.
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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.

 

View solution in original post

4 REPLIES 4
ballardw
Super User

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.

Anna_h
Calcite | Level 5
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?
ballardw
Super User

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.

 

Anna_h
Calcite | Level 5
Thanks a lot!

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1753 views
  • 1 like
  • 2 in conversation