[R] Variable names in plotCI

Pascal Oettli kridox at ymail.com
Fri Apr 11 12:57:37 CEST 2014


Hello,

When posting, you are asked to provide a reproducible code (including
packages you are using) and to not post in HTML.

The following might help:

library(plotrix)
y<-runif(10)
err<-runif(10)
plotCI(1:10,y,err,main="Basic plotCI",xaxt='n',xlab='')
axis(1,1:10,LETTERS[1:10])

Regards,
Pascal

On Fri, Apr 11, 2014 at 6:59 PM, Mª Teresa Martinez Soriano
<teresamarso at hotmail.com> wrote:
>
> Hello to everyone,
> I would like to put the variable names in the x-axis of this plot instead of number 1:63:
>
> plotCI(1:num_col_comp,med,2.06*des/sqrt(n),lwd=1,col="red",scol="seashell4",main="Intervalo de confianza",xlab="Variables clínicas",ylab="Intervalo de confianza")abline(h=0, col="yellowgreen",lwd=1.8)
>
> I don't find the way to do it, I tried with xlab option but it doesn't work and I tried as well creatting a data.frame with the rownames of the variables and the values 1:63
> Any idea will be very appreciated
> Thanks a lot
> An example of the data set could be:y<-runif(10)
>  err<-runif(10)
>  plotCI(1:10,y,err,main="Basic plotCI")
>  plotCI(1:10,y,err,2*err,lwd=2,col="red",scol="blue",
>   main="Add colors to the points and error bars")
>
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan




More information about the R-help mailing list