[R] Histogram Bar Spacing or Border Width

Zachary Holden hold9309 at uidaho.edu
Wed Feb 9 17:12:06 CET 2005


Tom,
I dealt with this once. 

 barplot.data<- c(2,3,4,5,6)
 x<- barplot(barplot.data, ylim = c(0,10), space= .9,.9,.9,.9)

use the space= to define the spacing between each of your barplot values. 
If you have groups of bars that you want together, with spaces between the groups,
you have to put 0's for each of the unspaced bars. 

Hope this helps,

Zack
----- Original Message -----
From: Thomas Hopper <tomhopper at comcast.net>
Date: Wednesday, February 9, 2005 7:02 am
Subject: [R] Histogram Bar Spacing or Border Width

> Is there any way to control the spacing between bars in a 
> histogram, or 
> change the border width (I'm assuming the hist() function, though 
> alternatives are welcome)? I'm interested in changing the visual 
> spacing 
> between columns in a plotted histogram.
> 
> The general effect I'm looking for can be accomplished in barplots 
> using 
> the "width=" parameter, but I have not been able to find a way to 
> adjust 
> the apparent spacing in histograms.
> 
> Thank you,
> 
> Tom Hopper
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-
> guide.html




More information about the R-help mailing list