I'm working on a time series of different stocks, and I am getting some issues in plotting them efficiently.
So my dataset looks like this:
A B C D
1/2/2012 0.007 0.012 0.015 0.009
1/3/2012 0.009 0.012 0.015 0.008
1/4/2012 0.012 0.012 0.015 0.009
1/5/2012 0.013 0.012 0.015 0.012
1/6/2012 0.013 0.012 0.015 0.011
1/9/2012 0.013 0.012 0.015 0.011
1/10/2012 0.013 0.009 0.015 0.011
1/11/2012 0.013 0.009 0.015 0.014
1/12/2012 0.013 0.009 0.015 0.014
1/13/2012 0.013 0.009 0.015 0.013
1/16/2012 0.013 0.012 0.014 0.017
1/17/2012 0.013 0.013 0.015 0.017
1/18/2012 0.014 0.013 0.015 0.018
1/19/2012 0.014 0.013 0.015 0.018
1/20/2012 0.015 0.012 0.015 0.018
1/24/2012 0.016 0.011 0.016 0.018
1/25/2012 0.016 0.011 0.016 0.019
1/26/2012 0.016 0.010 0.015 0.021
1/27/2012 0.016 0.010 0.015 0.022
1/30/2012 0.016 0.010 0.015 0.022
1/31/2012 0.016 0.010 0.015 0.022
2/1/2012 0.016 0.010 0.015 0.022
2/2/2012 0.020 0.012 0.015 0.025
Right now, I plotted all of the manually gX <- ggplot(dat, aes(Index, X)) + geom_line
and plotted them together through grid.arrange(g1, g2, g3, g4)
Is there a way to plot these using facet_grid since the way I did it was inefficient and rigid?
Below is the plot I did manually: