[Rd] Wish: Option to configure the default par() (PR#9545)

thomas.friedrichsmeier at ruhr-uni-bochum.de thomas.friedrichsmeier at ruhr-uni-bochum.de
Wed Mar 7 16:05:21 CET 2007


--nextPart4163908.Y9KBlY7Qjy
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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=20
drawbacks:

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

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

=46or many purposes this method is really useful, however, so thanks again =
for=20
pointing it out.

Regards
Thomas

--nextPart4163908.Y9KBlY7Qjy
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBF7tTmEKRv+5DVNhgRAhZ4AJ9StffA3KSO+h4ONdkWE7A1JarXWACdF8vu
pRW+6rL5DCS8iXppfxdIk88=
=rKvB
-----END PGP SIGNATURE-----

--nextPart4163908.Y9KBlY7Qjy--



More information about the R-devel mailing list