Stacking multiple plots, vertically with the same x axis but different Y axes in R

前端 未结 4 574
既然无缘
既然无缘 2020-12-24 14:39

I have a data.frame with multiple time series vectors against a date:time vector. I would like to plot all of the relevant vectors, vertically stacked on separate graphs wit

4条回答
  •  一整个雨季
    2020-12-24 15:29

    Just to be different, let me mention a solution involving neither lattice nor ggplot2 -- I posted this to Romain's R Graph Gallery a few years back as entry 65 with the code here. It just stacks the graphs up, using par() settings to keep them stacked.

    Note that the vertical sizes are different by choice, they could easily be of the same height as well.

    enter image description here

提交回复
热议问题