Re: [R] lattice package plots

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Fri 12 May 2006 - 01:25:53 EST

On 5/11/06, sundlm@rpi.edu <sundlm@rpi.edu> wrote:
> > > I am using the lattice packge for its levelplot and contourplot. Is it
> > > possible to adjust the line thickness of the 'box' and tickmarks in
> these
> > > plots?
> >
> > Yes, e.g.
> >
> > levelplot(volcano, par.settings = list(axis.line = list(lwd = 3)))
> >
> > The actual width of the box is actually half the advertised value
> > because of clipping.
>
>
> Exactly what I needed, I appreciate the help. Using your example, I've
> gained a significant amount
> of control over the look of my plots.

>
> Is there a way to print just a colorkey (maybe using draw.colorkey?)
> without a plot? I like the way a
> levelplot looks with it's colorkey, but I need to generate the plot and
> colorkey in separate devices
> (separate .ps files). Is this possible?

Sure, e.g.

library(lattice)
library(grid)
draw.colorkey(key = list(at = 0:50), draw = TRUE, vp = viewport(height = 0.9))

If you need to, you can access the value of 'key' from a levelplot object; try

levelplot(volcano)$legend$right$args

This is undocumented though, and not guaranteed (but likely) to remain unchanged.

Deepayan



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 12 01:34:18 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 12 May 2006 - 02:10:09 EST.

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