From paul@stat.auckland.ac.nz  Thu Nov  9 21:22:40 2000
From: paul@stat.auckland.ac.nz (Paul Murrell)
Date: Fri, 10 Nov 2000 10:22:40 +1300
Subject: [Rd] RE: [R] Graphics-Device-Size vs. Window-Size
References: <000201c04a39$8eed6dd0$c10616ac@bbdo.de>
Message-ID: <00d901c04a93$30cdde60$175dd882@stat.auckland.ac.nz>

Hi

[This also a reply to "[Rd] Another inconsistency concerning device-size vs.
window-size"]

I will try to give a brief overview of the way R graphics devices
(conceptually at least) work (to me at least).

Yes a window (x11 or win32) is a device.  Other devices are:  postscript,
png, jpeg, pictex, bmp.  Windows are different to these other devices
because they can be interactively resized.  R treats a change in window size
as a change in the (absolute) physical size of the device.  Perhaps another
way to respond to a window resize would be to retain the same physical
device size and have scroll bars on the window, but I don't think this is
still what you would want (?)

Text size is most often specified (ultmately) as a physical (absolute)
pointsize.  The reason for this (I think) is that ultimately text has to be
big enough to read.  Thus strwidth() will return the same answer in any
absolute set of units (e.g., "inch").  The correct interpretation of
strwidth(mytext, "user") is that it is the physical size of the text
_converted_ into user coordinates.

Automatic resizing of text is a tricky issue.  The text size is
automatically resized by R in some cases (e.g., for multiple figures), but
scaling text size continuously (e.g., with window size) does not tend to
produce useful results (e.g., it is too easy to produce text which is too
small to read).

I suspect that I'm not providing you with the answer you want;  I guess I'm
trying to explain how R works so that you can do what you need to.  Perhaps
it would help me to help you more if you described the graphics task you are
trying to achieve (?).

With respect to the par("din") inconsistency, that _is_ undesirable
behaviour.  The correct behaviour is the second one.  Could you please
submit a bug report for this (including your example).

Thanks

Paul


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] RE: [R] Graphics-Device-Size vs. Window-Size
Paul Murrell