I'm trying to plot 4 groups of data as boxplots on the same set of axis.
I've been able to use the print()
function to plot them on separate plots, but can't figure out how to plot them all together, preferably using the base package or lattice
below is some code I am trying, but it keeps coming up with error:
Error in x[floor(d)] + x[ceiling(d)] :
non-numeric argument to binary operator
Heres the code I'm currently trying:
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"))