BookmarkSubscribeRSS Feed
Fisher
Quartz | Level 8
My code is very simple:

goptions reset=all;
proc sgplot data=MeanValue;
xaxis label="Mean Score" values=(0 to 5 by 1);
yaxis label=" Test Items" ;
hbar Item / response=Avg barwidth=0.4;
run;

But I got this warning message:

WARNING: A very large output size of (3840, 2880) is in effect. This could make Java VM run out of memory and result in some Java exceptions. You should reduce the output size or DPI settings.

How to resolve it?

My another question is: how to split the long yaxis string tick-mark value into multiple lines?

Your help will be highly appreciated.
4 REPLIES 4
DanH_sas
SAS Super FREQ
Hey,

First of all, goptions reset=all has no effect here. To reset the ODS GRAPHICS environment, use this:

[pre]
ods graphics / reset;
[/pre]

See if that cleans up your size issue. As for the long y-axis tick value, there is currently not a way to split it. If it is possible to abbreviate it, you could use a user-defined format for that one value to shorten it.

Hope this helps,
Dan
DanH_sas
SAS Super FREQ
I looking at your example again, my guess would be that you have a high DPI set on the LISTING destination. If so, execute these statement before submitting your proc:

[pre]
ods listing close;
ods listing;
[/pre]

Thanks!
Dan
Fisher
Quartz | Level 8
Cool! it works! but I have no idea about the high DPS set on the listing destination, I didn't set anything specifically. Thanks Dan.

But how about my second question: how to split the long yaxis string tick-mark value into multiple lines? I found one of your replies in this forum that is seemly related to this question. currently SAS has no way to do this? if so, that is very bad, SAS should have option to do that.
Fisher
Quartz | Level 8
Thanks Dan. I didn't notice your first reply.

I tried to split the long string value in the following way, but the effect is not so satisfactory.

proc format;
value $itemfmt
'item1'='Easy access to supplies and\nequipment'
'item2'='Support services respond in\ntimely way'
'item3'='I am able to discuss challenging\nissues with team';
run;

proc sgplot data=MeanValue;
Xaxis label="Mean Score" values=(0 to 5 by 1);
yaxis label=" Items" ;
hbar Item / response=Avg;

format item $itemfmt.;
run;

The long string values did get split, but the distance of split lines is longer than that between each value. I maybe looks better if the distance between values is longer, but I don't know how to do that. Anyway this is just a reference for whoever really want to split the values.

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

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
  • 2232 views
  • 0 likes
  • 2 in conversation