我是 R 新手,真的可以得到一些帮助。
我有这三个数据框。
> Botcv
Date Average
1 2014-09-01 4.0
2 2014-10-02 5.5
> Botc1
Date Average
1 2014-10-15 2.125
2 2014-11-12 1.000
3 2014-12-11 0.500
> Botc2
Date Average
1 2014-10-15 3.375
2 2014-11-12 1.750
3 2014-12-11 0.625
我使用这些数据框来制作这个图
plot(Botcv$Date, Botcv$Average, type='p', pch=4, col="red", xlab='Date', ylab='', main=expression(italic('Botrylloides sp.')), xlim=c(as.Date("2014-09-01"),as.Date("2014-12-11")), ylim=c(0,10))
points(Botc1$Date, Botc1$Average, type='p', pch=19, xlab='Date', xlim=c(as.Date("2014-09-01"),as.Date("2014-12-11")), ylim=c(0,10))
points(Botc2$Date, Botc2$Average, type='p', pch=2, col="blue", xlab='Date', ylab='Average num ind.', xlim=c(as.Date("2014-09-01"),as.Date("2014-12-11")), ylim=c(0,10))
axis(4)
mtext("Average % cover",side=2,line=3, col="red")
mtext("Average num. ind.",side=4,line=3)
我想将此图生成为堆积条形图,而不仅仅是单个点。任何帮助将不胜感激,谢谢!