我正在尝试将 4 组数据绘制为同一组轴上的箱线图。我已经能够使用该print()
函数将它们绘制在单独的图上,但无法弄清楚如何将它们全部绘制在一起,最好使用基本包或格子
下面是我正在尝试的一些代码,但它不断出现错误:
Error in x[floor(d)] + x[ceiling(d)] :
non-numeric argument to binary operator
这是我目前正在尝试的代码:
Summer <- SeasonalMax$Summer
Autumn <- SeasonalMax$Autumn
Winter <- SeasonalMax$Winter
Spring <- SeasonalMax$Spring
boxplot(Summer, Autumn, Winter, Spring,
main = "Multiple boxplots for comparision",
at = c(1,2,3,4),
names = c("Summer", "Autumn", "Winter", "Spring"),
las = 2,
col = c("red","orange", "blue", "pink"))