Skip to content
Prev 200423 / 398503 Next

Discontinuous graph

On Nov 16, 2009, at 12:40 PM, Tim Smith wrote:

            
coords <- read.table(textConnection("a b c
  x 1 3 5
  y 5 8 6"), header=TRUE)

  plot(NULL, NULL, xlim = c(min(coords$a)-.5, max(coords$b)+.5),  
ylim=c(min(coords$c)-.5, max(coords$c)+.5)  )
  apply(coords, 1, function(x) segments(x0=x[1],y0= x[3], x1= x[2],  
y1=x[3]) )