R中多图的多行文字和外部问题

时间:2019-03-01 09:53:46

标签: r boxplot

tiff(filename = "Myplot.tiff",width = 130, height = 50, units = "mm", res=300)

par(mfrow=c(1,3))

par(oma=c(3,0,0,0))

par(mar=c(3,2,2,0))


boxplot(PVFD1 ~ Model*GW1, data = Carabooda5, main ="Carabooda", xlab ="GW allocation (ML)", 
ylab="Environmental damage cost($million)", col=c("grey41", "grey77"), 
cex.lab=0.5, cex.sub=0.8, cex.main=1, ylim=c(0,70), cex.axis = 0.5)

legend("topleft", legend=c("No internalization", "Internalization"),
       col=c("grey41", "grey77"), pch = 15, bty = "n", pt.cex = 0.8, cex = 0.5,  horiz = F)


boxplot(PVFD1 ~ Model*GW1, data = Neerabup5, main ="Neerabup", xlab="GW allocation (ML)", 
        ylab="Environmental damage cost($million)", col=c("grey41", "grey77"), cex.lab=0.8, cex.sub=0.8, cex.main=1, cex.axis=0.5, 
        ylim=c(0,70))

legend("topleft", legend=c("No internalization", "Internalization"),
       col=c("grey41", "grey77"), pch = 15, bty = "n", pt.cex = 0.8, cex = 0.5,  horiz = F)


boxplot(PVFD1 ~ Model*GW1, data = Neerabup5, main ="Nowergup", xlab="GW allocation (ML)", 
        ylab="Environmental damage cost($million)", col=c("grey41", "grey77"), cex.lab=0.8, cex.sub=0.8, cex.main=1, cex.axis=0.5,
        ylim=c(0,70))

legend("topleft", legend=c("No internalization", "Internalization"),
       col=c("grey41", "grey77"), pch = 15, bty = "n", pt.cex = 0.8, cex = 0.5,  horiz = F)

mtext("Myplot", outer = TRUE, cex = 0.5, font=4 )

dev.off()

我不知道为什么外部“ Myplot”没有显示在图的底部?即使我将代码与标题一起放置,y轴也没有标题。

我实际上只需要y轴标题并在Carabooda中打勾。可以将其他两个图形粘在一起,以便同时显示所有这三个图形的一个普通y轴标题和对勾和一个x轴标题。

还有人知道如何使图表更清晰吗?我只能使用灰色,并且尺寸由日志确定(130 x 50)

enter image description here

0 个答案:

没有答案