テーマ間にスペースを入れずに 2 つのプロットを貼り付けたい (したがって、1 つの軸を共有する)。
与えられた:
p1 <- qplot(1,1,xlab="")
p1 <- p1 +
theme(legend.position="none",
axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
plot.margin=unit(c(1,1,0,1), "cm"),
panel.margin=unit(c(1,1,0,1), "cm"))
p2 <- qplot(1,2)
grid.arrange(p1,p2)
生成するもの:
2 つのプロット間の空白を削除したい。
の幅に対して行われたように、高さを微調整している印象があります。2つのグラフの端を左揃えにする(ggplot)が解決策ですが、それを理解できません。