[R] box() and hist()

Marc Schwartz MSchwartz at MedAnalytics.com
Mon Oct 25 19:55:19 CEST 2004


On Mon, 2004-10-25 at 12:02, garbade at mip.paed.uni-muenchen.de wrote:
> Hi,
> does anybody know why the following is not working:
> 
> > hist(rnorm(200))
> > box(bty="o")
> 
> gives me a box without rounded corners.

You will not get rounded corners with box().

The 'bty' argument determines how many sides of the plot region are
drawn using box().

"o" gives you all four sides (1:4)

"l" gives you left and lower (2 and 1)

"7" gives you upper and right (3:4)

"c" gives you all except right (1:2, 3)

"u" gives you all except upper (1:2, 4)

"]" gives you all except left (1, 3:4)

Try this as an example:

plot(1:10, axes = FALSE)
box(bty = "7")

Substitute each of the bty types to review further.

HTH,

Marc Schwartz




More information about the R-help mailing list