[R] bty

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Thu Apr 17 11:12:42 CEST 2008


Agustin Lobo wrote:
> Dear list:
> Is there any way of getting the equivalent to what you get with bty="l"
> for the right and bottom axes? and the equivalent to
> bty="7" for the upper and left axes?
>
> Thanks!
>
> Agus
>   
Not using bty, but you can get the coordinates of the boundary via
par("usr") and draw boundary lines individually by code like the following.

plot(0,bty="n")
bb <- par("usr")
abline(v=bb[1:2],h=bb[3:4],lwd=1,col=2:5)

(You may get in trouble with large line widths and clipping, in which
case you probably want to use segments(...., xpd=TRUE), although finding
the right selection of the four limits  and putting them in the right
order can be a bit challenging.)

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-help mailing list