[R] plot circles where z values are circles radius
drjimlemon at gmail.com
Fri Jan 23 22:50:14 CET 2015
Part of the problem is the scale of your numbers. You probably want
something like this.
What happens here is that the default plotting character, which
happens to be a circle, is plotted in a size relative to the ratio of
each z value to the minimum z value. This is because the default value
of cex is 1. I have multiplied the result by 2 to make what is
happening more obvious. If you want to generate circles with specific
diameters, you will have to scale these to the area of the plot in
user units - see par("usr").
On Sat, Jan 24, 2015 at 8:29 AM, Thomas Adams <tea3rd at gmail.com> wrote:
> I think what you should look at are these web sites I found with a Google
> On Fri, Jan 23, 2015 at 2:12 PM, Dr. Alireza Zolfaghari <
> ali.zolfaghari at gmail.com> wrote:
>> Hi there,
>> I am trying to plot z values using Circle symbol. Each x and y has a value
>> which will be plotted using a circle where circle's radius is corrlated
>> with the value of z.
>> I wrote the code , but unable to change the size of circle no matter what I
>> chose for Scale. Any help please?
>> x=c(84390255386 ,84390255386, 78028317380 ,53594648044,422)
>> y=c(949849442 ,941645043, 840135292, 74, 821632939)
>> z=c(0.005641896, 0.005641896 ,0.005641896, 0.007978846,0.007978846)
>> xlims =c(min(x),max(x))
>> ylims =c(min(y),max(y))
>> symbols(x,y, circles=z, fg='red')
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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