CRAN - Package cowplot ggplot2のグラフをうまいこと学会や論文発表で使いやすいように整形したり並べたりできるパッケージ。
公式vignettes Introduction to cowplot Arranging plots in a grid Changing the axis positions Plot annotations Shared legends
random dispersal: (cowplotパッケージ)研究用にスッキリ簡潔にggplotを描画 & 複数パネル化
scalesかなんかでgridの図の間の調節ができる模様
作成した図の保存 図を保存する際は「ggplot2::ggsave
」でも大抵通るようだが、「cowplot::save_plot
」の利用が推奨されている。 save_plot: Alternative to ggsave, with better support for multi-figure… in cowplot: Streamlined Plot Theme and Plot Annotations for ‘ggplot2’
「base_width
」と「base_height
」の扱いに注意。あとはggsave
の引数が普通に使える。「dpi
」とか。
save_plot(filename, plot, ncol = 1, nrow = 1, base_height = 4,
base_aspect_ratio = 1.1, base_width = NULL, ..., cols = NULL,
rows = NULL)