I have three groups, each containing a pair of barplots. I would like to add space between each group, so there is some distinction. However, when I manipulate the margins via mar parameter in par(), it affects the width of the barplot.
par(mfrow=c(1,6))
#pair1
par(mar=c(5,2,5,1), xpd=TRUE)
barplot(t(cbind(1, 5, 6)), col=c("red", "orange", "yellow"))
par(mar=c(5,2,5,2), xpd=TRUE)
barplot(t(cbind(3, 3, 2)), col=c("blue", "green", "purple"))
#pair2
par(mar=c(5,4,5,1), xpd=TRUE)
barplot(t(cbind(2, 2.5, 5)), col=c("red", "orange", "yellow"))
par(mar=c(5,2,5,2), xpd=TRUE)
barplot(t(cbind(5, 1, 3)), col=c("blue", "green", "purple"))
#pair2
par(mar=c(5,4,5,1), xpd=TRUE)
barplot(t(cbind(4, 2, 1)), col=c("red", "orange", "yellow"))
par(mar=c(5,2,5,2), xpd=TRUE)
barplot(t(cbind(6, 2, 1)), col=c("blue", "green", "purple"))
How can I add more space in between the 3 plots while maintaining the width of the barplots? Appreciate any advice.