[R] xyplot tick marks and line thickness
Deepayan Sarkar
deepayan.sarkar at gmail.com
Thu Aug 24 20:19:26 CEST 2006
On 8/24/06, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> Look through the output of trellis.par.get() for the right parameters
> or when all else fails use grid (which we use below for the
> box around the panel since I could not locate the parameter):
>
> library(lattice)
> library(grid)
> x <- 1:12
> g <- gl(3,4)
> lwd <- 3
> xyplot(x ~ x | g, type = "l", lwd = lwd,
> scales = list(tck = -1, lwd = lwd),
> par.settings = list(add.text = list(lwd = lwd),
> strip.border = list(lwd = lwd)),
> panel = function(...) {
> grid.rect(gp = gpar(lwd = lwd))
> panel.xyplot(...)
> }
> )
Right. the grid call shouldn't be necessary, "axis.line" controls the
panel borders. And tck can be a vector, to get rid of the ugly bumps
on top:
xyplot(x ~ x | g, type = "l", lwd = lwd,
scales = list(tck = c(-1, 0)),
par.settings =
list(axis.line = list(lwd = lwd),
strip.border = list(lwd = lwd)))
-Deepayan
>
>
> On 8/24/06, Piet Bell <pj.bell at yahoo.co.uk> wrote:
> > Hello,
> > A made a xyplot using the lattice library in R (latest version).
> >
> > The publisher of our paper has requested:
> >
> > 1. all tick marks should point inwards instead of outwards.
> >
> > 2. All lines should be thicker (lines, axes, boxes, etc. Everything). Lines is easy...I used: lwd=1.5 but what about the lines of the axes, and the lines that build up the plot itself?....?
> >
> > Any suggestions?
> >
> > Kind regards,
> >
> > Piet Bell
More information about the R-help
mailing list