5
我試圖設置一個單一的公共的標題,和獨特的常見的xy軸標籤:控制的R中的曲線圖的標題參數
dev.new(width = 9, height = 10)
layout(matrix(c(0, 1, 1, 2, 3, 4, 2, 5, 6, 0, 7, 7), 4, 3, byrow = TRUE), widths = c(1, 4, 4), heights = c(1, 4, 4, 1))
par(mar = c(1, 0, 1, 0))
plot(c(1:2), type = "n", xlab = "", ylab = "", axes = F, cex = 0.7) #general title
title(main = "title", ps = 2)
par(mar = c(1, 0, 1, 1))
plot(c(1:2), type = "n", xlab = "", ylab = "", axes = F, las = 2, cex = 0.7) #general y-label
title(main = " y-label ", las = 0)
par(cex= 0.9, mar = c(5, 1, 1, 2))
plot(c(1:10), type="l", xlab = "A", ylab = "", axes = T, las = 1, cex = 0.7) # first subplot
par(cex= 0.9, mar = c(5, 1, 1, 3))
plot(c(10:1), type ="l", xlab = "B", ylab = "", axes = T, las = 1, cex = 0.7) # second subplot
par(cex= 0.9, mar = c(5, 1, 1, 2))
plot(c(1:10), type="l", xlab = "C", ylab = "", axes = T, las = 1, cex = 0.7) # third subplot
par(cex= 0.9, mar = c(5, 1, 1, 3))
plot(c(1:2), type="l", xlab = "D", ylab = "", axes = T, las = 1, cex = 0.7) # fourth subplot
par(mar = c(1, 0, 1, 0))
plot(c(1:2), type = "n", xlab = "", ylab = "", axes = F, cex = 0.7) #general x-label
title(main = " x-label ")
如何控制字體大小,這些標題的位置和方向?
非常感謝!我用一種非常粗略的方式解決了這個問題,使用位於佈局 –
的相應位置的空圖的xlab和ylab參數,直到上個星期,辦公室裏的一個新女孩偶然發現了「oma」。頭腦風暴。 – Backlin