我正在使用以下代码使用beanplot函数:
library(beanplot)
beanplot(Grainyield~Year*Tmnt,las = 2,
data = maize,
xlab = "Factors Year.Water Treatment ",
ylab = "Yield [kg/ha]",
col = list("yellow", "orange", "green", "blue"))
legend("bottomleft",
bty="n",
c("2008","2009","2010","2011"),
fill = c("yellow", "orange", "green", "blue"))
x轴标签不正确,我尝试使用以下代码格式化x轴标签,但是我一直收到错误消息:
axis(1, at=2008.1:2011.6,
labels=c[1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6])
有什么建议吗?