Created
May 29, 2013 16:19
-
-
Save martin0258/5671572 to your computer and use it in GitHub Desktop.
Time series plotting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plot multiple time series at one time | |
# Trick 1: use cut to rotate label values of y-axis | |
# Trick 2: use auto.key=list(space="inside") to make the legend be inside the panel. | |
ratings <- read.csv("Chinese_Weekday_Drama.csv", fileEncoding="utf-8") | |
xyplot(ts(ratings),superpose=TRUE,strip=FALSE,cut=1, | |
ylab="Rating",type="b",lwd=2,main="TV Rating Actual Data", | |
auto.key=list(space="inside")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment