BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sm4
Quartz | Level 8 sm4
Quartz | Level 8

Hello,

 

I'm trying to increase the space between groups/clusters on a graph made with vbar:

 

	proc sgplot data= temp.figure4 noborder nowall pad=(left= 5pct right= 5pct);
		vbar region/response= change
			group= time groupdisplay= cluster
			baselineattrs=(thickness=0) datalabel datalabelattrs= (family= albany weight=bold) barwidth= 1.0;
		xaxis display= (nolabel) fitpolicy= splitalways values= ('value1' ' ' 'value2' 'value3' 'value4' 'value5' 'value6' 'value7' 'value8' 'value9') valueattrs= (family= albany weight=bold size= 8pt);
		yaxis label= 'label' values= (0.00 to 0.10 by 0.02) valuesformat= PERCENTN10.1 valueattrs= (family= albany weight=bold size= 8pt) labelattrs= (family= albany weight= bold size=10pt);
	run;

I'm using 'barwidth= 1.0;' making it 0.9 creates a nice space between clusters but also creates space within a cluster - I need the bars within a cluster to be touching.

 

Would appreciate any tips.

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

Use CLUSTERWIDTH to change your width between clusters, and BARWIDTH to change the bar widths within the clusters. 

View solution in original post

2 REPLIES 2
DanH_sas
SAS Super FREQ

Use CLUSTERWIDTH to change your width between clusters, and BARWIDTH to change the bar widths within the clusters. 

sm4
Quartz | Level 8 sm4
Quartz | Level 8

Thanks very much!! Googled but somehow that option never turned up.

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
  • 2 replies
  • 5752 views
  • 1 like
  • 2 in conversation