[R] Problem with pointsizes in Graphics
Robert Offinger
rooff at merkur.math.uni-magdeburg.de
Sat Jun 3 22:43:55 CEST 2006
Hello,
I have a problem with the sizes of points on the screen (Code tested for
some R versions on a Solaris system and also for Linux). Maybe it is
best to start with an example:
If I do a very simple plot using the character '.' for the points, e.g.,
n<-100; plot(0:n,0:n,pch='.',cex=1+(0:n)/20)
then not all for all the points the horizontal and vertical dimensions
are the same: Some points are larger in the vertical dimension, some are
larger in the horizontal dimension. This behaviour doesn't depend on the
pointsize itself but on the specific coordinate of the point, e.g.,
plot(runif(30),runif(30),pch='.',cex=2)
and some points are thicker or higher than others.
So it seems to me that it is not a good idea using pch='.' with
character expansions greater than 1. But other characters have their
problems too, e.g.,
plot(runif(30),runif(30),pch=19,cex=0.1)
and there aren't any points on my screen (for cex=0.2 it depends on the
computer display I am using).
So I would like to have points which are larger than the pixel-point I
get when I use pch='.' with cex=1. So let's say I want point of the size
2x2 pixels (most of the points with '.' and cex=2 have these
dimensions), but I do not like the effect that some points are larger
than others. On the other hand I am afraid that using pch=19 and a small
cex results in no points.
Any suggestions?
Thanks,
Robert Offinger
OvG-Universität Magdeburg
More information about the R-help
mailing list