Re: [R] bty

From: Peter Dalgaard <P.Dalgaard_at_biostat.ku.dk>
Date: Thu, 17 Apr 2008 11:12:42 +0200

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

______________________________________________
R-help_at_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.
Received on Thu 17 Apr 2008 - 09:42:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 17 Apr 2008 - 10:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive