Re: [R] xyplot tick marks and line thickness

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri 25 Aug 2006 - 04:25:56 EST

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



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 and provide commented, minimal, self-contained, reproducible code. Received on Fri Aug 25 04:40: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 25 Aug 2006 - 06:23:04 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.