[R] showing the integrated number by point size
Barry Rowlingson
B.Rowlingson at lancaster.ac.uk
Fri Feb 17 17:44:59 CET 2006
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
More information about the R-help
mailing list