R-alpha: Re: lwd, cex and par(.) issues [was "... windows quirks .."]
Martin Maechler
Martin Maechler <maechler@stat.math.ethz.ch>
Mon, 8 Sep 1997 16:21:56 +0200
[[yet another discussion brought from R-core to R-devel]]
>>>>> "RG" == Robert Gentleman <rgentlem@stat.auckland.ac.nz> writes:
RG> Peter, there is some code for line types and widths in all the
RG> drivers. With windows there is the well known limitation that you
RG> can't have patterened lines with lwd larger than 1 (unless you
RG> write your own routines .... I just haven't had time). I do agree
RG> that there is something very weird going on with our code though!
RG> I think that in plot(1:4,lwd=2) the lwd should have absolutely
RG> no effect. I think it's a bug in Splus that it does. For example,
RG> plot(1:4,col="red")
I agree, and I also have been hating this (Splus) behavior.
I do prefer R's behavior have different 'col', 'cex', 'font' for
axis, labs, and points/lines.
After reading PD's reply to this message, I agree that
"lwd" is somewhat different:
If your device has too thin lines in general, it is nice if you can
increase line width GLOBALLY.
The same for "cex":
There are situations where ALL text and plotting characters should
just be made bigger with the same zoom factor.
Below, you (RG) mention the use of par(lwd=...)
{and correspondingly would be par(cex=...)}.
Is this going to be ``the standard'':
For global changes of linewidth or character size,
one must use par(lwd=..) or par(cex=..)
?
RG> gives you everything in red; axes, labels, lines and
RG> points. That's wrong. In plot(1:4,type="l",lwd=2) lwd should
RG> affect the width of the line joining the points but not the width
RG> of the lines for the bounding box (IMHO).
I agree, but again, it might be nice if there was something like a
"global.lwd".
RG> I think that if you want to change the line widths on the
RG> bounding box you should use par(lwd=2) and then all lines are
RG> changed. This seems to work (but I don't doubt there are bugs; we
RG> simply have never had the chance to exercise everything).
RG> As for character expansion- par cex seems to be the only route
RG> (which makes me like my suggestion even more).
RG> Opinions? It would be easy enough to mimic S but I do think
RG> it's wrong.
We should not mimic S here, sometimes.
I agree it's wrong in some places.
But if you use a different scheme, it should be
- well documented
- very consequently implemented ==> easily remembered by users
-- Martin
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-