[R] Default par() options

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Mar 1 23:25:40 CET 2007


Hi Petr,

On Thursday 01 March 2007 21:50, Petr Klasterecky wrote:
> I am no expert on these topics but currently I am solving a similar
> issue using the .Rprofile file and the .First function. So maybe it's
> enough to put
> .First <- function(){
> par(whatever you want)
> further instructions if neccessary
> }

thanks for your suggestion. The problem in this particular case is that the 
par() options are kept separate for each created device. Hence the defaults 
would need to be set while the device is created (or directly afterwards), 
and simply setting them once on startup won't work.

E.g.:
par(bg="blue") 	# creates a new x11 (or system default) device
par("bg")			# "blue"
dev.off()
par("bg")			# creates a new device; "transparent"
dev.off()

X11()			# or windows()/quartz()/...
par(bg="blue")
par("bg")			# "blue"
dev.off()
X11()			# or windows()/quartz()/...
par("bg")			# "transparent"
dev.off()

Regards
Thomas Friedrichsmeier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20070301/f533c6aa/attachment.bin 


More information about the R-help mailing list