[R] Bar widths in barplots don't change

Thomas Lumley tlumley at u.washington.edu
Mon Feb 5 18:33:00 CET 2001

On Mon, 5 Feb 2001 s-luppescu at uchicago.edu wrote:

> On 05-Feb-2001 Thomas Lumley wrote:
> > On Mon, 5 Feb 2001 s-luppescu at uchicago.edu wrote:
> > 
> >> Is the width= parameter in barplot() supposed to work? I couldn't get it to
> >> work in my plot, and even in the example,
> >> 
> >> data(VADeaths, package = "base")
> >> barplot(VADeaths, width=rep(0.1, 4))
> >> 
> >> the plot looks identical regardless of what I put in for the width. I looked
> >> at
> >> the source for barplot() and it looks like it SHOULD work (but what do I
> >> know).
> > 
> > width= controls relative widths of bars. You probably want space=
> I set space=0 because I want no space BETWEEN bars. But I only have two bars
> that are rather short, so I want to make the width of the bars narrower so the
> bars don't look so squat. Isn't it width= I want to manipulate?

In that case you probably want to manipulate the aspect ratio of the
whole plot. If it's got two bars and there's no space between them they
must fill up the available width.


r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list