[S] a better box()?

Greg Tucker-Kellogg (GTuckerKellogg@genetics.com)
Thu, 03 Sep 1998 16:22:24 -0400


The simple S function box() does
not work as I would expect when
plots have logarithmic axes. I
know the par()$usr values are
modified when a plot is
logarithmic, but shouldn't such a
simple function as box() have
enough information to work as
expected? The help for box reads
"Surrounds the current plot with a
box of given thickness". No
mention is made of logarithmic axis
problems.

For example, try:

plot(c(10,1000),c(10,1000))
box(fill=T,col=2)
plot(c(10,1000),c(10,1000),log='x')
box(fill=T,col=2)
plot(c(10,1000),c(10,1000),log='y')
box(fill=T,col=2)

This is using S-Plus v 4.0r3 under
Windows NT 4.0r3.

Is there some component of par()
that could be used by a better
box() to draw boxes correctly in
the case of logaritmic axes?

TIA,

Greg

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news