Skip to content

several plots in one

1 message · Warnes, Gregory R

#
If you want two series of plotted confidence intervals, first plot one series using plotCI with the standard arguments, then call plotCI a second time with add=TRUE.  For example:


       data(state)
       tmp   <- split(state.area, state.region)
       means <- sapply(tmp, mean)
       stdev <- sqrt(sapply(tmp, var))
       n     <- sapply(tmp,length)
       ciw   <- qt(0.975, n) * stdev / sqrt(n)

       # First series
       plotCI(x=means, uiw=ciw)

	 # Second series
       plotCI(x=means+1e5, uiw=ciw, add=T)


Note that you may need to manually specify xlim and ylim to ensure that the second series fits on the plot.

-Greg
http://www.R-project.org/posting-guide.html
----------------------------------------------------------------------
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}