[R] default borders in boxplot and barplot

2009-10-14 Thread Jennifer Young
This is my first post so hopefully I haven't mucked up the rules.

I'm trying to change the default borders in either boxplot or barplot so
that, at the request of a journal, all of my figures have the same type of
border.

I've successfully used par(bty=o)  using plot(1:10, bty=o), but it
seems that barplot and boxplot have their own defaults that override this.

I've tried both
par( bty=o)
barplot(stuff)

and

barplot(stuff, bty=o)


Does anyone know a trick that doesn't involve using abline() to force
borders?

Thanks
Jen Young, MSc

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] default borders in boxplot and barplot

2009-10-14 Thread Barry Rowlingson
On Wed, Oct 14, 2009 at 2:21 AM, Jennifer Young
jennifer.yo...@math.mcmaster.ca wrote:
 This is my first post so hopefully I haven't mucked up the rules.

 I'm trying to change the default borders in either boxplot or barplot so
 that, at the request of a journal, all of my figures have the same type of
 border.

 I've successfully used par(bty=o)  using plot(1:10, bty=o), but it
 seems that barplot and boxplot have their own defaults that override this.

 I've tried both
 par( bty=o)
 barplot(stuff)

 and

 barplot(stuff, bty=o)


 Does anyone know a trick that doesn't involve using abline() to force
 borders?


 Just do box() to draw a box round your plot area? Using the example
from ?barplot

  require(grDevices) # for colours
   tN - table(Ni - stats::rpois(100, lambda=5))
   r - barplot(tN, col=rainbow(20))
  box()

Barry

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.