plot with overlapping points
plot, r
Solution
Here's a simpler (I think) solution:
x <- c(4,4,4,7,3,7,3,8,6,8,9,1,1,1,8)
y <- c(5,5,5,2,1,2,5,2,2,2,3,5,5,5,2)
size <- sapply(1:length(x), function(i) { sum(x==x[i] & y==y[i]) })
plot(x,y, cex=size)
Problem
I have data in R with overlapping points. ``` x = c(4,4,4,7,3,7,3,8,6,8,9,1,1,1,8) y = c(5,5,5,2,1,2,5,2,2,2,3,5,5,5,2) plot(x,y) ``` How can I plot these points so that the points that are overlapped are proportionally larger than the points that are not. For example, if 3 points lie at (4,5), then the dot at position (4,5) should be three times as large as a dot with only one point.