Re: [R] Unexpected line type in lattice plot key on pdf device

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Wed, 30 Jul 2008 17:18:27 -0700

On Wed, Jul 30, 2008 at 6:41 AM, G. Draisma <g.draisma_at_erasmusmc.nl> wrote:
> L.S.,
> With the code below,
> on the Windows screen the line types in the key show
> as solid and dashed as in the graph,
> and in the pdf file they show
> as solid in the key and solid and dashed in the graph.
> I would not expect that,
> but may be I get something wrong.
> Gerrit.
>
> -------
> library(lattice)
> # pdf("pietje.pdf")
> x<-0:10
> xyplot((x^0.5)+(x^0.75)~x,type="o",lty=c(1,2),
> auto.key=list(points=F,lines=T,columns=2, type="o",divide=1))
> # dev.off()
> -------

I'm surprised that you see differences between windows() and pdf(). In any case, the correct call would be something like

xyplot((x^0.5)+(x^0.75)~x,type="o",

       par.settings = simpleTheme(lty=c(1,2)),
       auto.key=list(points=F,lines=T,columns=2, type="o",divide=1))

______________________________________________
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 31 Jul 2008 - 00:21:08 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 31 Jul 2008 - 01:33:07 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