BookmarkSubscribeRSS Feed
tarheel13
Rhodochrosite | Level 12

lrackley_0-1615488886673.png

Can anyone tell me which options I have to change to make these bars bigger and more space between them? Just looks too on top of each other as it is currently. I tried barwidth and clusterwidth and it's not producing what I want.

proc sgpanel data=aedata;
panelby sev_abbr;
hbar SOC/response=count group=aesevn groupdisplay=cluster datalabel=labelvar clusterwidth=0.85 barwidth=0.85;
colaxis label="Number of Events";
rowaxislabel="System Organ Class";
run;
2 REPLIES 2
ballardw
Super User

The Clusterwidth and Barwidth are ratio values and the default is .8 so your change to .85 is not significant.  Reduce Barwidth to get space between bars, at .5 the width between bars should be the width of the bar

 

 

Some other ideas: increase the available height of the graph area. ODS Graphics / height=6in;

would set the display height to 6 inches. Set a height bigger and then play with the cluster and bar width parameters.

 

If you want lots of control you can use another plot like VECTOR but that means doing a lot more work to control the x,y pairs for base and height for the vector bars and really wants a numeric axis, so you would need to work more with the axis and Vector doesn't have any "cluster". So you get to spend a lot of time working on the exact placement of bars. One thing though is you can have a variable represent how wide each vector bar should be, so you have a different tool to emphasize / de-emphasize each bar

tarheel13
Rhodochrosite | Level 12

Okay, I will try a height of 6+ inches. Here is some fake data. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 563 views
  • 2 likes
  • 2 in conversation