About "cex=": how to improve resolution?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

About "cex=": how to improve resolution?

Luca Quaglia
Hi,

I need to plot a graph with a circle of radius 1 and
with a series of points of different size. The size of
these points compared to the fixed circle is important
and bears a meaning.

Here is the a simplified version of the code I'm
using:

x<-seq(0,2,by=0.2)
y<-x
z<-seq(0,1,by=0.1)
angle<-pi/180*c(0:359)
par(pty="s")
plot(-2:2,-2:2,type="n")
lines(cos(angle),sin(angle))
points(x,y,cex=z)

I 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 in order to have 10
points *all* of different size (respecting the above
written different values of cex)? The circle is fixed
of radius 1 and the values of cex are in relation with
that and they shouldn't be modified.

Thanks, Luca

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: About "cex=": how to improve resolution?

Richard M. Heiberger
replace
points(x,y,cex=z)
with
symbols(x, y, circles=z/10, inches=FALSE, add=TRUE)

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: About "cex=": how to improve resolution?

Gregory Snow
In reply to this post by Luca Quaglia
Use the symbols function!


-----Original Message-----
From: "Luca Quaglia" <[hidden email]>
To: "[hidden email]" <[hidden email]>
Sent: 3/9/07 2:55 PM
Subject: [R] About "cex=": how to improve resolution?

Hi,

I need to plot a graph with a circle of radius 1 and
with a series of points of different size. The size of
these points compared to the fixed circle is important
and bears a meaning.

Here is the a simplified version of the code I'm
using:

x<-seq(0,2,by=0.2)
y<-x
z<-seq(0,1,by=0.1)
angle<-pi/180*c(0:359)
par(pty="s")
plot(-2:2,-2:2,type="n")
lines(cos(angle),sin(angle))
points(x,y,cex=z)

I 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 in order to have 10
points *all* of different size (respecting the above
written different values of cex)? The circle is fixed
of radius 1 and the values of cex are in relation with
that and they shouldn't be modified.

Thanks, Luca

______________________________________________
[hidden email] 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.

______________________________________________
[hidden email] 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.