[6484] in s-news-athena

home help back first fref pref prev next nref lref last post

Re: trellis setting for strip.names background color

daemon@ATHENA.MIT.EDU (shyu@research.att.com)
Wed Feb 22 12:11:19 1995

From: shyu@research.att.com
Date: Wed, 22 Feb 95 11:30 EST
To: S-news@utstat.toronto.edu

Shawn Boles <shawn@shadowfax.ori.org> wrote :

> In looking at the trellis settings documentation I am not able to
> ascertain which component controls the background of strip names.
>  I have tried the following:
> 
> # make local copy in .Data directory
> > trellis.settings.color<-trellis.settings.color
> > find(trellis.settings.color)
> [1] ".Data"                               
> [2] "/usr2/splus3.1/library/trellis/.Data"
> > str(trellis.settings.color$strip.factor)
> List of 1
>  $ col: num [1..7] 13 12 11 10  9 ...
> 
> # change strip.factor settings to those of black & white device
> > trellis.settings.color$strip.factor<-trellis.settings.bwps$strip.factor
> 
> > 
> > trellis.settings.color$strip.factor$col
> [1] 0 0 0 0 0 0 0
> 
> 
> # still get color(cyan I believe) bg on strip.factor
> # so shut down device and force reread of settings
> > dev.cur()
>  openlook 
>         3
> > dev.off()
>  openlook 
>         2
> > trellis.device(openlook)
> > # still get color on bg of strip.factor
> > 
> > trellis.settings.color$strip.factor$col
> [1] 0 0 0 0 0 0 0
> > 
> 
> 
> # force trellis.settings$strip.factor$col to 0
> > trellis.settings$strip.factor$col
> [1] 9   # have no idea where trellis got this...
> > trellis.settings$strip.factor$col<-0
> 
> > trellis.settings$strip.factor$col
> [1] 0
> > 
> # still get color bg
> 
> 
> # so maybe strip.factor is wrong component....
> 
> 
> any help in setting background on trellis.device(openlook) panel
> factor labels would be appreciated...

The above mentioned procedure in customizing strip.factor is correct.
BUT one has to make sure that the trellis.device() get called
AFTER the change, so to summarize this proper procedure :

> trellis.settings.color<-trellis.settings.color
> trellis.settings.color$strip.factor<-trellis.settings.bwps$strip.factor
> trellis.device(openlook)
> xyplot( .... )

In the next release of Trellis, there will be a much easier way to change
setting parameters: through the use of a new function, trellis.par.set().
The new procedure will be :

> trellis.par.set("strip.factor", trellis.settings.bwps$strip.factor)
> trellis.device(openlook)
> xyplot( .... )

No local copy of trellis.settings.color is required.

Ming

 o=======================================================================o
 | Ming-Jen Shyu (Ming)                 INTERNET:  shyu@research.att.com |
 | AT&T Bell Laboratories, Room 2C-263  UUCP:      attmail!research!shyu |
 | 600 Mountain Avenue                  office:    (908) 582-6863        |
 | Murray Hill, NJ 07974-2070, USA      fax:       (908) 582-3340        |
 o=======================================================================o

home help back first fref pref prev next nref lref last post