[R] About "cex=": how to improve resolution?

Greg Snow Greg.Snow at intermountainmail.org
Fri Mar 9 21:44:40 CET 2007


If the size of the circle is important, then you may want to use the
symbols function with the circle argument rather than points and cex.
Use the inches argument to set the size (in inches) of the largest
circle, then the other circles will be scalled accordingly.  Or if you
set inches=FALSE, then the circles will be scaled to the x-axis.

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Luca Quaglia
> Sent: Friday, March 09, 2007 1:11 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] About "cex=": how to improve resolution?
> 
> Hi,
> 
> I need to plot a graph with a fixed circle and with a series 
> of point of different size. Here is a "simplified" example:
> 
> angle<-pi/180*c(0:360)
> x<-seq(0,2,by=0.2)
> y<-seq(0,2,by=0.2)
> z<-seq(0,1,by=0.1)
> par(pty="s")
> plot(-2:2,-2:2,type="n")
> lines(cos(angle),sin(angle))
> points(x,y,cex=z)
> 
> The size of the points compared to the circle (of radius 1) 
> is important and bears a meaning. 
> 
> But instead of having 11 points with increasing size, I only 
> obtain points of the same size when
> cex=0.1/0.2/0.3/0.4 or cex=0.5/0.6/0.7 or cex=0.8/0.9/1.0.
> 
> Please, does anyone know if there is a way of improving the 
> resolution of "cex=" *without* changing the size of the 
> circle of radius 1 and keeping the same axis?
> 
> Thanks in advance!!!
> 
> Luca
> 
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list