[R] plotCI line types for line and for bar

lehe timlee126 at yahoo.com
Wed May 13 14:15:13 CEST 2009

Thank you!
Yes, I am using the plotCI from gplots and I want the line connecting the
centers to be dashed, just as for the bars. However changing the type to be
"p" as you said does not give dashed line but no line at all (only points). 

lehe wrote:
> Anyone has some clue to this question?
> Thanks in advance!
> lehe wrote:
>> Hi,
>> I was wondering how to specify the line type for line instead of for bar.
>> Here is my code:
>> "plotCI(x=mcra1avg, uiw=stdev1, type="l",col=2,lty=2)"
>> This way, I will have the bar line as dashed "lty=2" and red "col=2", and
>> the line connecting the centers of the bars is also red "col=2" but solid 
>> "lty=1". How to make the line connecting the bar centers have the same
>> solid lty as the bar?
>> Thanks and regards!
>   You neglected to say that you were using the plotCI from gplots (not the
> one from plotrix, which has slightly different behaviors).  Here's my
> solution (with some data made up -- you didn't give a reproducible
> example).
> I assume that you meant above that you wanted the line connecting the
> centers to be dashed?
> mcra1avg <- 1:3
> stdev1 <- c(0.2,0.1,0.4)
> library(gplots)
> plotCI(x=mcra1avg, uiw=stdev1, type="p",col=2,lty=2)
> lines(mcra1avg,col=2,lty=2)
>   By the way, it's not all uncommon to have to wait more than 12 hours for
> a response on the R list -- the variability is very high ... I would say
> it's generally good to wait at least 24 hours before "bumping" ... 
>   Ben Bolker

View this message in context: http://www.nabble.com/plotCI-line-types-for-line-and-for-bar-tp23501900p23520615.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list