[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    Re: [Rd] Wish: Option to configure the default par() (PR#9545)
From:       thomas.friedrichsmeier () ruhr-uni-bochum ! de
Date:       2007-03-07 15:05:21
Message-ID: 20070307150521.1EBCD5ABF8 () slim ! kubism ! ku ! dk
[Download RAW message or body]

On Tuesday 06 March 2007 17:56, Greg Snow wrote:
> Another approach may be to use hooks (see ?setHook).  The plot.new
> function already has a hook, so you could do your option #1
> automatically by setting that hook.
>
> Better would be if all the graphics device functions had hooks (or a
> common hook), then you could set that hook to set your graphics
> parameters and they would be set every time a new graphics device was
> started.

Thanks for your suggestion. This does almost everything I want. Two small 
drawbacks:

1) Setting par(bg=...) from the hook has no effect for the first graph plotted 
in the new device. For this to work, the hook would need to be called 
before .Internal(plot.new()) instead of afterwards in plot.new().

2) Any par() parameters explicitely set in the call to X11()/postscript()... 
will be overridded, instead of taking precendence over the defaults.

For many purposes this method is really useful, however, so thanks again for 
pointing it out.

Regards
Thomas

[Attachment #3 (application/pgp-signature)]
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic