[英]How to center ggplot figure in R
有沒有辦法將底行的“打開托盤”圖形居中?
我正在嘗試使用sfplot <- ggarrange(Cf, Ff, Of, labels = c("A", "B", "C"))
,但顯然它不會自動居中。 提前致謝!
如果你想使用ggarrange
,那么你可以將每一行圖嵌套在另一個ggarrange
(盡管這顯然比只使用patchwork
更冗長):
library(ggpubr)
library(ggplot2)
Cf <- Ff <- Of <- ggplot(mtcars, aes(disp, wt)) + geom_point()
sfplot = ggarrange(ggarrange(Cf, Ff, ncol = 2, labels = c("A", "B")),
ggarrange(NULL, Of, NULL, ncol = 3, labels = c("", "C", ""), widths = c(1,2,1)),
ncol = 1)
Output
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.