centipede.plot(segs,midpoint="mean",lower.limit="std.error",
upper.limit="std.err",left.labels=NULL,right.labels=NULL,sort.segs=TRUE,
main="",xlab="",vgrid=NA,mar=NA,col=par("fg"),bg="green",...)
get.segs
.plot
.centipede.plot
displays one or more midpoints and limits as
filled circles with horizontal error bars. It places labels on the left and
right sides of the plot. If these labels are long, it may be necessary to
pass explicit values to the mar
argument to leave enough room.
Similarly, centipede plots typically have a large number of subsets, and
it may be necessary to start the graphics device with an aspect ratio that
will prevent crowding of the labels when over 30 segments are displayed.
The matrix segs
may be entered manually or read from a file.
The first row specifies midpoints, the second and third rows the lower
and upper limits respectively and the fourth row the number of valid
observations.get.segs
testcp<-list("",40)
for(i in 1:40) testcp[[i]]<-rnorm(sample(1:8,1)*50)
segs<-get.segs(testcp)
centipede.plot(segs,main="Test centipede plot",vgrid=0)
Run the code above in your browser using DataLab