[R] plotting multiple time series under one panel

Raghuraman Ramachandran optionsraghu at gmail.com
Wed Feb 25 14:32:07 CET 2015


Dear guRus

I have data frame as:
str(voldf)
'data.frame': 130 obs. of  8 variables:
 $ Date: Date, format: "2014-08-01" "2014-08-05" "2014-08-08" ...
 $ kc  : num  0.453 0.424 0.468 0.481 0.485 ...
 $ sb  : num  0.1128 0.123 0.1272 0.1128 0.0949 ...
 $ qc  : num  0.0626 0.0661 0.0777 0.0765 0.0763 ...
 $ c   : num  0.167 0.182 0.183 0.21 0.215 ...
 $ w   : num  0.21 0.271 0.282 0.351 0.345 ...
 $ s   : num  0.249 0.253 0.295 0.332 0.35 ...
 $ ct  : num  0.212 0.22 0.228 0.188 0.181 ...

I am trying to plot multiple line charts for each of the columns and
show them together in the same panel. Is it possible please using
ggplot?

I tried melting dfm=melt(voldf, id.vars="Date") and then plotted this
but it gives me all graphs in one panel which did not help.

Any assistance is greatly appreciated.

Many thx
Raghu



More information about the R-help mailing list