I am using this code to graph a histogram, but the barlabels are overlapping eachother. Like in excel , is there a way to change orientation of the barlabels? I have been trying to look for the ans for the past 1 hour. I found orient and rotate option but don't seem to work here.
Thanks.
proc univariate data = have noprint;
histogram variable1 /
vscale=percent
barlabel = percent
midpoints = -50 to 50 by 2;
INSET N MEAN (8.2) MEDIAN (8.2) STD = 'Std. Dev' (8.3)/ POSITION = ne;
label variable1= "";
run;
Many midpoints doesn't leave much space. Consider if you actually need that many or if the spacing (the 2) needs to be that small.
Increase the graph size using ODS graphics options is one possibility but may not be feasible depending on the actual range of values.
Another might be to use Proc SGPLOT which has many more options with histogram. Or summarizing the data and using a VBAR or HBAR type display.
The blog post below may be of help
https://blogs.sas.com/content/graphicallyspeaking/2016/12/19/axis-values-display/
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.