trellis.par.get without opening a device?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

trellis.par.get without opening a device?

Dieter Menne
I am using the Deepayan's Sweave trick to set graphics parameters for all
graphs:

ltheme = canonical.theme(color=TRUE)
sup = trellis.par.get("superpose.line")
ltheme$superpose.line$col = c('black',"red","blue","#e31111","green",
"gray")
....

Works perfectly, there is only a minor nuissance that trellis.par.get opens
a device every time, producing a dummy Rplots.ps file or a window (when run
after Stangle).

Is there a way to suppress this? Well, not really serious.

Dieter

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: trellis.par.get without opening a device?

Deepayan Sarkar
On 4/24/06, Dieter Menne <[hidden email]> wrote:
> I am using the Deepayan's Sweave trick to set graphics parameters for all
> graphs:
>
> ltheme = canonical.theme(color=TRUE)
> sup = trellis.par.get("superpose.line")
> ltheme$superpose.line$col = c('black',"red","blue","#e31111","green",
> "gray")
> ....

Why do you need to call trellis.par.get? I don't see you using 'sup'
(maybe in the ... part), and I don't see why you would need to.

> Works perfectly, there is only a minor nuissance that trellis.par.get opens
> a device every time, producing a dummy Rplots.ps file or a window (when run
> after Stangle).

An Rplots.ps may still be produced by Sweave (I forget the reason, but
something to do with the need for an explicit print), but shouldn't
happen when running the R code separately.

Deepayan

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: trellis.par.get without opening a device?

Dieter Menne
Deepayan Sarkar <deepayan.sarkar <at> gmail.com> writes:

> > I am using the Deepayan's Sweave trick to set graphics parameters for all
> > graphs:
> >
> > ltheme = canonical.theme(color=TRUE)
> > sup = trellis.par.get("superpose.line")
> > ltheme$superpose.line$col = c('black',"red","blue","#e31111","green",
> > "gray")
> > ....
>
> Why do you need to call trellis.par.get? I don't see you using 'sup'
> (maybe in the ... part), and I don't see why you would need to.
>

O, shame... you are right, the sup is totally nonsense. It's a relic from my
standard way to find out what's going on inside Sarkastic world of lattice  
parameters. Someone volunteering to make show.settings() a self-completing
documentation whenever a new parameter comes in?

Thanks a lot. Mea stupid.

Dieter

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html