我想为图像组创建描述。它出现在页面的底部(黄色和绿色图之间),如果文本长度超过一行,则它将保持对齐。
我的基本脚本没有创建所需的标签。
par(mfrow=c(2,2), oma = c(1, 0, 0, 0))
#oma creates more space at bottom of graph
# create your four plots and labels
hist(mtcars$mpg, breaks=12, col="red")
mtext("a)",side=3, at=8,2)
hist(mtcars$mpg, breaks=12, col="blue")
mtext("b)",side=3, at=8,2)
hist(mtcars$mpg, breaks=12, col="yellow")
mtext("c)",side=3, at=8,2)
hist(mtcars$mpg, breaks=12, col="green")
mtext("d)",side=3, at=8,2)
# create label
mtext('Figure 1. The same historgrams of mpg plotted with different colours. Clockwise from upper left: red, blue, green, yellow',
side = 1, outer = TRUE, line = 2)