|
Hi,
I've done my best to search for a solution to this, but had no luck. How can I create a lattice plot (I'm using xyplot() ) that does not have a border on the top and right side, but keeps the bottom/left axes? So far all I've found is this, which inserted into the xyplot call removes all 4 borders: / par.settings = list(axis.line = list(col = 0))/ xyplot( Sepal.Length ~ Petal.Length, auto.key=T, data=iris, par.settings = list(axis.line = list(col = 0))) Thanks in advance, - Jon / / -- Jon Zadra Department of Psychology University of Virginia P.O. Box 400400 Charlottesville VA 22904 (434) 982-4744 [hidden email] [[alternative HTML version deleted]] ______________________________________________ [hidden email] 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. |
|
You need to do a little more work to add the components you want "back
in". I think you want something like: xyplot( Sepal.Length ~ Petal.Length, auto.key=T, data=iris, par.settings = list(axis.line = list(col = 0)),scales=list(col=1,tck=c(1,0)), panel=function(...){ lims <- current.panel.limits() panel.xyplot(...) panel.abline(h=lims$ylim[1],v=lims$xlim[1]) }) HTH On Tue, Apr 24, 2012 at 12:10 PM, Jon Zadra <[hidden email]> wrote: > Hi, > > I've done my best to search for a solution to this, but had no luck. > How can I create a lattice plot (I'm using xyplot() ) that does not have > a border on the top and right side, but keeps the bottom/left axes? > > So far all I've found is this, which inserted into the xyplot call > removes all 4 borders: > > / par.settings = list(axis.line = list(col = 0))/ > > xyplot( Sepal.Length ~ Petal.Length, auto.key=T, data=iris, par.settings > = list(axis.line = list(col = 0))) > > Thanks in advance, > > - Jon > / > > / > > -- > Jon Zadra > Department of Psychology > University of Virginia > P.O. Box 400400 > Charlottesville VA 22904 > (434) 982-4744 > [hidden email] > > [[alternative HTML version deleted]] > > ______________________________________________ > [hidden email] 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. ______________________________________________ [hidden email] 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. |
| Powered by Nabble | Edit this page |
