about ts.plot
1
0
Entering edit mode
@yanjuliacsnl-1786
Last seen 9.7 years ago
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? Regards, Yanju Zhang
• 5.5k views
ADD COMMENT
0
Entering edit mode

Hello Yanju Zhang, There is a great ggplot2 package that involve many ways to change colors involving good areas that involve lines. Use the ?ggplot line to help!

Regards, Blake Chapman

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States
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.
ADD COMMENT

Login before adding your answer.

Traffic: 818 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6