Skip to content
Prev 333521 / 398506 Next

Question on xyplot

Hi

I missed the original posting

I think to get the full picture we need to a reproducible example eg by dput
of the data. 

To keep all the information about a plot you can use the par.settings
argument which is an alternative to trellis.par.set().
Try names(trellis.par.get()) to get a list of all the arguments
Or for an individual one
trellis.par.get()$superpose.line # or
trellis.par.get()[[21]] 

The legend colours lines and symbols are controlled by superpose.symbol,
superpose.line and superpose.polygon so setting these can fix things.

Eg
par.settings = list(superpose.line = list(lty = 0:7, col = 1:8, lwd = 10)),

The other alternative is to use the key argument eg

key=list(text =list(...),
               lines=list(lty = 0:7, col = 1:8, lwd = 10),
               points = list(...)),   

I frequently put everything in par.settings when I have a simple panel
function eg 

panel = function(x,y,...){
panel.abline(...)
xyplot(x, y, ...)

}

or when the panel function is not required.

Regards

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Carl Witthoft
Sent: Thursday, 21 November 2013 23:22
To: r-help at r-project.org
Subject: Re: [R] Question on xyplot

you didn't show us the code you used to generate the legend.
I'm guessing you want to add to the legend list something like "lty=0:7" .



KB wrote
--
View this message in context:
http://r.789695.n4.nabble.com/Question-on-xyplot-tp4680833p4680888.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.