インセットを印刷し、ggplots のプロットからグリッドを作成できます。しかし、左側にプロットがあり、右側に 2 つのプロットがあるグリッドを作成することはできません。
a_plot <- ggplot(cars, aes(speed, dist)) + geom_line()
#The inset
print(a_plot);print(a_plot, vp = vp)
# the Grid
lay <- rbind(c(1,1,1,2,2,2),
c(1,1,1,2,2,2),
c(1,1,1,2,2,2),
c(1,1,1,2,2,2))
grid.arrange(a_plot, a_plot,layout_matrix = lay)
しかし、私はこれが欲しいです:
これどうやってするの?
これは機能しません
grid.arrange(a_plot, a_plot,print(a_plot, vp = vp),layout_matrix = lay)
私はこれを試しましたが、うまくいきませんでした。