Re: [R] showing the integrated number by point size

From: Barry Rowlingson <B.Rowlingson_at_lancaster.ac.uk>
Date: Sat 18 Feb 2006 - 03:44:59 EST

Knut Krueger wrote:
> Is there any function to show the points like this example of SPSS?
>
> http://biostatistic.de/temp/reg.jpg
>
> The point size should represent the number of data at this point.
>

plot with cex for the size and pch for solid points:

   xys=data.frame(x=c(0,0,1,2,2,3,3),y=c(0,1,1,1,2,2,3),s=c(4,1,2,1,1,1,2))

plot(xys$x,xys$y,cex=xys$s,pch=19)

or 'symbols', but you need to scale things a bit:

symbols(xys$x,xys$y,circles=xys$s/15,inches=F,bg="black")

Of course if your data is just (x,y) pairs and you want to work out the counts then that's another problem...

Barry



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 Sat Feb 18 04:06:40 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 14:08:40 EST