[BioC] about ts.plot

James W. MacDonald jmacdon at med.umich.edu
Tue Feb 6 15:09:20 CET 2007


Hi Yanju,

yanju wrote:
> Dear all,
> 
> I was tring to plot Multiple Time Series using ts.plot. Then I want to
> give each time series a color. My code is like follows:
> 
> color<-rainbow(ncol(ts))
> ts.plot(ts,col=color)
> 
> then I got colorful lines, but I dont know which line is corresponding to
> which color. How to settel this problem? and how to add also axes label?

How about

legend("topright", legend=colnames(ts), lty=1, col=color)

As for adding an axis label, have you read the help page for ts.plot? It 
looks pretty clear to me.

Best,

Jim


> 
> Regards,
> Yanju Zhang
> 
> _______________________________________________
> 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


-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623


**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.



More information about the Bioconductor mailing list