Data visualization with SAS programming

SGPLOT VBAR: increase space between clusters without increasing space between bars within cluster

Accepted Solution Solved
Reply
Contributor sm4
Contributor
Posts: 48
Accepted Solution

SGPLOT VBAR: increase space between clusters without increasing space between bars within cluster

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!


Accepted Solutions
Solution
‎03-22-2018 05:05 PM
SAS Super FREQ
Posts: 1,047

Re: SGPLOT VBAR: increase space between clusters without increasing space between bars within cluste

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

View solution in original post


All Replies
Solution
‎03-22-2018 05:05 PM
SAS Super FREQ
Posts: 1,047

Re: SGPLOT VBAR: increase space between clusters without increasing space between bars within cluste

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

Contributor sm4
Contributor
Posts: 48

Re: SGPLOT VBAR: increase space between clusters without increasing space between bars within cluste

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 146 views
  • 1 like
  • 2 in conversation