[BioC] how to add SD onto a plot

Thomas Girke thomas.girke at ucr.edu
Mon Nov 20 21:30:38 CET 2006


Here is how I usually do this:

# (1) Create and plot some sample data
bar <- barplot(x <- abs(rnorm(10,2,1)), names.arg = letters[1:10], col="red", ylim=c(0,5))
stdev <- x/5
# (2) Add error bars 
arrows(bar, x, bar, x + stdev, length=0.15, angle = 90)
arrows(bar, x, bar, x + -(stdev), length=0.15, angle = 90)

Thomas
	
On Mon 11/20/06 20:05, Matthias Kohl wrote:
> Hello,
> 
> function plotCI in package gplots or function plotCI in package plotrix 
> might do what you want.
> 
> hth
> Matthias
> 
> 
> Jianping Jin schrieb:
> > Dear list,
> >
> > Does any one know how to add SD information of a data set onto a plot which 
> > displays mean values for each group? I did something like:
> >
> >   
> >> x = c(0,1,2,3)
> >> y = apply(data,2,mean)
> >> plot(x,y)
> >>     
> >
> > Thanks for you help!
> >
> > Jianping
> >
> > ##################################
> > Jianping Jin Ph.D.
> > Bioinformatics scientist
> > Center for Bioinformatics
> > Room 3133 Bioinformatics building
> > CB# 7104
> > University of Chapel Hill
> > Chapel Hill, NC 27599
> > Phone: (919)843-6105
> > FAX:   (919)843-3103
> > E-Mail: jjin at email.unc.edu
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor at stat.math.ethz.ch
> > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
> >   
> 
> 
> -- 
> Dr. rer. nat. Matthias Kohl
> E-Mail: matthias.kohl at stamats.de
> Home: www.stamats.de
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
> 

-- 
Thomas Girke, Ph.D.
1008 Noel T. Keen Hall
Center for Plant Cell Biology (CEPCEB)
University of California
Riverside, CA 92521

E-mail: thomas.girke at ucr.edu
Website: http://faculty.ucr.edu/~tgirke
Ph: 951-827-2469
Fax: 951-827-4437



More information about the Bioconductor mailing list