[R] Large plot symbols (with pch = 1 etc)

Prof Brian D Ripley ripley at stats.ox.ac.uk
Sat Dec 4 18:36:40 CET 1999

On Thu, 2 Dec 1999, John Maindonald wrote:

> On my home (Windows 98) machine I find:
> > par()$cra
> [1] 42 16
> > par()$csi
> [1] 0.1666667
> > 
> On my work machine I believe I had
> par()$cra
> [1] 17 16
> So it looks as though R is reading the width wrongly,
> and that it is the width that is somehow used to
> determine the plot character size.

Indeed, that is precisely the problem.  What the code in rw0900 does is to
ask Windows for the width of the widest character in the font used as the
default plotting font (TrueType Times New Roman in a default installation).  
On Windows 95 that will probably be `M' and you get a sensible answer.
However, the latest TrueType fonts contain a vast range of glyphs, some of
them multi-character ones. The width and (adjusted to remove the leading)
height obtained is used to set cra for the device.

I've rewritten this to ask for the dimensions of `M'. Unfortunately there
is at least a chance that it will not get that correct either, so we need
to do some more testing and probably add a sanity check for width <=
height. (Yes, I know 17 > 16, but the height is about 19 before
adjustment.) The reason I spotted this is that it appears that we have the
problem on NT4 machines only if they have Office 2000 installed.
Hopefully rw0901 will have a better solution than the present one.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help 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-help-request at stat.math.ethz.ch

More information about the R-help mailing list