Skip to content

How can I plot this graph

3 messages · David Rees, Gabor Grothendieck, Jim Lemon

#
Try this:

matplot(xxx[,1], xxx[2:4], type = "l")
with(xxx, {
	segments(x, z1, x, z2)
	points(x, z1)
	points(x, z2)
})

Omit the two points commands if you don't want circles at the ends of
the segments.
On Dec 6, 2007 6:30 PM, David Rees <davidrees1 at yahoo.co.uk> wrote:
#
David Rees wrote:
This doesn't look right to me, but it might give you a start:

library(plotrix)
brkdn.plot(c("y1","y2","y3"),NA,"x",xxx,
  dispbar=FALSE,col=2:4,ylim=c(-3,10))
dispbars(xxx$x,xxx$y1,xxx$z1,col=2)
dispbars(xxx$x-0.12,xxx$y2,xxx$z2,col=3)

Jim