Plot multiples (time) series in R with legend

后端 未结 4 1689
南旧
南旧 2021-02-06 05:30

\"enter

According to my datas (cf. picture) called GDP. I would like to know how to plot a

4条回答
  •  一向
    一向 (楼主)
    2021-02-06 06:09

    In just 2 lines using ts.plot

        ts.plot(time,gpars= list(col=rainbow(10)))
        legend("topleft", legend = 1:10, col = 1:10, lty = 1)
    

    Result: Plot multiples (time) series in R with legend Plot multiples (time) series in R with legend

提交回复
热议问题