Re: [R] ylim problem in barplot

From: Marc Schwartz <MSchwartz_at_mn.rr.com>
Date: Fri 06 Jan 2006 - 00:40:32 EST

On Thu, 2006-01-05 at 14:01 +0100, Bliese, Paul D LTC USAMH wrote:
> R Version 2.2.0
>
> Platform: Windows

> When I use barplot but select a ylim value greater than zero, the graph
> is distorted. The bars extend below the bottom of the graph.

> For instance the command produces a problematic graph.

> barplot(c(200,300,250,350),ylim=c(150,400))

> Any help would be appreciated.

> Paul

Use:

  barplot(c(200, 300, 250, 350), ylim = c(150, 400), xpd = FALSE)

The 'xpd = FALSE' will enable clipping of the graphic at the boundary of the plot region.

See ?par for more information on 'xpd'.

HTH, Marc Schwartz



R-help@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 Received on Fri Jan 06 00:54:02 2006

This archive was generated by hypermail 2.1.8 : Fri 06 Jan 2006 - 02:11:34 EST