Ich würde gerne 2 meiner Boxplots in einer Graphik darstellen. Bin über den Befehl "par()" gestoßen, hat aber leider nicht funktioniert. Kann mir da jemand weiterhelfen?
Meine Boxplots sehen so aus:
Code: Alles auswählen
# 1. Boxplot
ggplot(h2o2_fusarien, aes(x = Einwirkzeit, y = Reduktion.log, fill=Belastung) )%>%
+geom_boxplot()%>%
+stat_boxplot(geom = "errorbar")%>%
+theme(axis.title.y = element_text(angle=0,margin=margin(t=0,r=0,b=0,l=10)))%>%
+geom_hline(yintercept = 4, color = "red", lwd = 0.5)%>%
+ggtitle("H2O2 3% Fusarien")
#2. Boxplot
ggplot(h2o2_aspergillen, aes(x = Einwirkzeit, y = Reduktion.log, fill=Belastung) )%>%
+geom_boxplot()%>%
+stat_boxplot(geom = "errorbar")%>%
+theme(axis.title.y = element_text(angle=0,margin=margin(t=0,r=0,b=0,l=10)))%>%
+geom_hline(yintercept = 4, color = "red", lwd = 0.5)%>%
+ggtitle("H2O2 3% Aspergillen")
Code: Alles auswählen
par(mfrow=c(2,1))
ggplot(h2o2_fusarien, aes(x = Einwirkzeit, y = Reduktion.log, fill=Belastung) )%>%
+geom_boxplot()%>%
+stat_boxplot(geom = "errorbar")%>%
+theme(axis.title.y = element_text(angle=0,margin=margin(t=0,r=0,b=0,l=10)))%>%
+geom_hline(yintercept = 4, color = "red", lwd = 0.5)%>%
+ggtitle("H2O2 3% Fusarien")
ggplot(h2o2_aspergillen, aes(x = Einwirkzeit, y = Reduktion.log, fill=Belastung) )%>%
+geom_boxplot()%>%
+stat_boxplot(geom = "errorbar")%>%
+theme(axis.title.y = element_text(angle=0,margin=margin(t=0,r=0,b=0,l=10)))%>%
+geom_hline(yintercept = 4, color = "red", lwd = 0.5)%>%
+ggtitle("H2O2 3% Aspergillen")