[R] Lattice: set col = "black" for box.rectangle and box.umbrella

Rich Shepard rshepard at appl-ecosys.com
Thu Jul 2 18:57:52 CEST 2015


On Thu, 2 Jul 2015, David Winsemius wrote:

> The lead-in to section 7.2 mentions `trellis.par.get`,  but in order to
> change anything you need to use `trellis.par.set` as was illustrated in
> the pages leading up to that section:

David,

   I saw `trellis.par.set` but did not know how to use that in ~/.Rprofile.
>
> trellis.par.set(box.umbrella=list(col="black"))
> bwplot(decrease ~ treatment, OrchardSprays)
> trellis.par.set(box.rectangle=list(col="black"))
> bwplot(decrease ~ treatment, OrchardSprays)
>
> Could do it all at once with:
>
> trellis.par.set(list(
>              box.umbrella=list(col="black"),
>              box.rectangle=list(col="black")
>                  )
>
> And Sarkar mentions that this form can be used to create a theme. You may
> want to investigate the function `standard.theme` and read section 7.1.4
> of that chapter again.

   Yes. Modifying the standard.theme would do the job, too.

Many thanks,

Rich



More information about the R-help mailing list