BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I would like to increase the width of the bars.
bu1 has two categories and question has 4 categories (8 bars).
I've tried changing the width and space, but I keep getting this warning:
WARNING: There was not enough room to use the specified width of 10 for the bars.

Does anyone know how to get around this problem and increase the width of the bars?

proc gchart data=bar1 anno=my_anno1;
hbar bu1 / discrete
nostats
type=sum sumvar=catpct
group=question
subgroup=qs
autoref clipref cref=graycc
maxis=axis1
raxis=axis2
width=10
legend=legend1
coutline=black
/*space=15*/
1 REPLY 1
GraphGuy
Meteorite | Level 14
This one's hard to answer exactly, without having the data to experiment with, but here are a couple of ideas ...

Perhaps you could make the entire chart taller (such as using "goptions ypixels=1000"), which would give more room for wider bars.

Perhaps try changing the device (there might be slight differences in bar spacing between dev=gif and dev=png, and there will certainly be differences with dev=actximg and dev=javaimg).

And if the values along the bottom/response axis of your hbar chart have a format applied, and if that format 'pads' on a lot of extra space on the left (such as if you're using the "comma20." format, when your numbers only need 4 or 5 digits), then you might try using a smaller format to free up some space to be used by wider bars in the bar chart.

These are just some ideas - not really sure if any of them will be your "silver bullet" though! :) Message was edited by: Robert Allison @ SAS

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1616 views
  • 0 likes
  • 2 in conversation