[R] How to generate scatterplot - with a twist

thernubblet njhuang86 at yahoo.com
Fri Oct 1 17:41:29 CEST 2010


Hi. I would like to make a scatterplot where all of the points are evenly
spaced from each other - however, they are all the same size and occupy the
entire graph. For example:

x = rep(c(1:10), 10)
y = rep(c(10:1), each = 10)
plot(x, y, pch = 0)

Gives me a scatter plot with 100 square points each evenly spaced between
each other. But these points don't fill up the entire space and if I try to
change the 'cex' value, the points on the edges get messed up. I was
wondering if there was a way to fill up the entire space (all of the edges
of the little squares are touching each other) and each individual square is
the same size. Any help will be greatly appreciated!
-- 
View this message in context: http://r.789695.n4.nabble.com/How-to-generate-scatterplot-with-a-twist-tp2923805p2923805.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list