[R] Note: "The default device has been opened to honour attempt to modify trellis settings"

Luis Ridao Cruz Luisr at frs.fo
Wed Mar 16 12:16:57 CET 2005


R-help,

I'm using a function whose end result is a trellis plot.
When I call the function I get sometimes the following message:

"Note: The default device has been opened to honour attempt to modify
trellis settings "

leading up to any plot whatsoever.

I call the package 'lattice' within the function and 'detach' after
plotting.

I have to close the graphics device to get the desired result (and it
works only after a few more function calls)

Here is the function code

"function"<-function(somedata)
{
 ..........

library(lattice)
trellis.par.set(theme = col.whitebg())

xyplot(log.catch ~ age | yrclass , data = tmp2)

detach(package:lattice)

savePlot(file="catch curve",type="jpeg")

}

function(somedata)


Thanks in advance.

I'm running on Windows XP

> version
         _              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    2              
minor    0.1            
year     2004           
month    11             
day      15             
language R




More information about the R-help mailing list