[R] Problem with pointsizes in Graphics

From: Robert Offinger <rooff_at_merkur.math.uni-magdeburg.de>
Date: Sun 04 Jun 2006 - 06:43:55 EST


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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Jun 04 06:52:39 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 05 Jun 2006 - 18:10:25 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.