This might not possible in R but I thought I would give it shot. I am have to set up a 40 x 40 cm grid of 181 points equidistant from each other. Is there any way to produce a graph with R that can do this for me? Actual sizes are unimportant as long it is to scale. Thanks -- View this message in context: http://www.nabble.com/Grid-building-in-R-tp18371874p18371874.html Sent from the R help mailing list archive at Nabble.com.
What do you mean by equidistant? You can have three points that are equidistant on the plane, but there's no way to add another point and have it be the same distance from all of the existing points. (Unless all the points are in the same place) Hadley On Wed, Jul 9, 2008 at 5:02 PM, hippie dream <tonightsthenight at gmail.com> wrote:> > This might not possible in R but I thought I would give it shot. I am have to > set up a 40 x 40 cm grid of 181 points equidistant from each other. Is there > any way to produce a graph with R that can do this for me? Actual sizes are > unimportant as long it is to scale. Thanks > -- > View this message in context: http://www.nabble.com/Grid-building-in-R-tp18371874p18371874.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- http://had.co.nz/
Still not sure exactly what you want, but it sounds like the 'grid' package may be of some help. It has very flexible ways partitioning regions for plotting. Is this anything like you're after? library(grid) for(i in 0:10) for(j in 0:10) grid.points(i / 10, j / 10, default.unit = "npc") hippie dream wrote:> This might not possible in R but I thought I would give it shot. I am have to > set up a 40 x 40 cm grid of 181 points equidistant from each other. Is there > any way to produce a graph with R that can do this for me? Actual sizes are > unimportant as long it is to scale. Thanks
On Wednesday 09 July 2008, hippie dream wrote:> This might not possible in R but I thought I would give it shot. I am have > to set up a 40 x 40 cm grid of 181 points equidistant from each other. Is > there any way to produce a graph with R that can do this for me? Actual > sizes are unimportant as long it is to scale. Thankshow about: # 40cm spacing spacings <- 0:13*40 # a square grid with 196 points # sqrt(181) is not an integer, sorry! g <- expand.grid(x=spacings, y=spacings) # check it out plot(g, pch=3, cex=0.5) -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341