[R] xyplot tick marks and line thickness

Gabor Grothendieck ggrothendieck at gmail.com
Thu Aug 24 20:37:13 CEST 2006


That should read finding and setting.  Chuck already showed how
to find them.

On 8/24/06, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:
> Here is a way to automate finding the lwd= parameters.
>
> library(lattice)
>
> # test data
> x <- 1:12
> g <- gl(3, 4)
> lwd <- 3
>
> # set parameters
> par <- trellis.par.get()
> par <- lapply(par, function(x) replace(x, names(x) == "lwd", lwd))
> xyplot(x ~ x | g, type = "l", par.settings = par)
>
>
> On 8/24/06, Chuck Cleland <ccleland at optonline.net> wrote:
> > Piet Bell 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?
> >
> > library(lattice)
> >
> > trellis.device()
> >
> > # to find all components with lwd setting
> > # names(trellis.par.get()[grep("lwd", trellis.par.get())])
> >
> > trellis.par.set(
> >  add.line = list(lwd=1.5),
> >  plot.polygon = list(lwd=1.5),
> >  box.rectangle = list(lwd=1.5),
> >  box.umbrella = list(lwd=1.5),
> >  dot.line = list(lwd=1.5),
> >  plot.line = list(lwd=1.5),
> >  reference.line = list(lwd=1.5),
> >  strip.border = list(lwd=1.5),
> >  superpose.line = list(lwd=1.5),
> >  superpose.polygon = list(lwd=1.5),
> >  axis.line = list(lwd=1.5),
> >  box.3d = list(lwd=1.5))
> >
> > xyplot(rnorm(5) ~ 1:5, type = "b",
> >       scales = list(x = list(tck = -1), y = list(tck = -1)))
> >
> > >   Kind regards,
> > >
> > >   Piet Bell
> > >
> > >
> > > ---------------------------------
> > >
> > >       [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-help at 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
> > > and provide commented, minimal, self-contained, reproducible code.
> > >
> > >
> >
> > --
> > Chuck Cleland, Ph.D.
> > NDRI, Inc.
> > 71 West 23rd Street, 8th floor
> > New York, NY 10010
> > tel: (212) 845-4495 (Tu, Th)
> > tel: (732) 512-0171 (M, W, F)
> > fax: (917) 438-0894
> >
> > ______________________________________________
> > R-help at 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
> > and provide commented, minimal, self-contained, reproducible code.
> >
>



More information about the R-help mailing list