Re: [R] Drawing paths through a grid

2010-06-17 Thread Tal Galili
Hi Rex, It sounds like something that can be done with ?lines If you would supply with a simple self contained data that represents what you are trying to plot, then we might be able to better help you. If you have the data in R, use "dput" to be able to copy paste it into the email. Cheers, Tal

Re: [R] Drawing paths through a grid

2010-06-17 Thread baptiste auguie
Hi, Try this, ## create a 2D grid with random point sizes d = expand.grid(x=1:10,y=1:10) d$size = runif(nrow(d), 1,5) ## create some random links links= d[sample(seq(1,nrow(d)),20),] links$id = sample(2:6, nrow(links),repl=T) ## plot library(ggplot2) ggplot(d, mapping=aes(x,y)) + geom_point(

[R] Drawing paths through a grid

2010-06-17 Thread Rex C. Eastbourne
I would like to draw a set of points that are equally spaced in a 2-D grid. Then I would like to draw lines that illustrate different directed paths through subsets of points. Imagine that the points correspond to booths in a conference center, and I want to show the various paths people took to vi