[R] ylim problem in barplot

Ben Bolker bolker at ufl.edu
Thu Jan 5 20:21:48 CET 2006

Robert Baer <rbaer <at> atsu.edu> writes:

> Well, consider this example:
> barplot(c(-200,300,-250,350),ylim=c(-99,400))
> It seems that barplot uses ylim and pretty to decide things about the axis
> but does some slightly unexpected things with the bars themselves that are
> not just at the 'zero' end of the bar.
> Rob

  in previous cases I think there was room for debate about
the appropriate behavior.  What do you think should happen
in this case?  Cutting off the bars seems like the right thing
to do; is your point that the axis being confined to positive
values (a side effect of setting ylim) is weird?


More information about the R-help mailing list