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?
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.
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:
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.
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.
The 2025 SAS Hackathon Kicks Off on June 11!
Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.