cowplot plot_grid自动缩小图表的大小

问题描述 投票:0回答:1

我正在尝试使用cowplot的函数plot_grid渲染一个带有一系列25个图表的pdf,这些图表排列在6列中。

如果我只有一行,我希望这些显示的大小与它们出现的大小相同。由于某些原因,虽然我添加新行时图的大小变小了。有没有我不知道的解决方案?以下是具有两种结果的代码。提前谢谢了

仅1行plot_grid

cowplot::plot_grid(plot_emmeans_N_L, plot_emmeans_N_L,
plot_emmeans_N_L,plot_emmeans_N_L,plot_emmeans_N_L,
plot_emmeans_N_L,  nrow = 1, ncol=6, align = "v")

在这里看起来如何:enter image description here

以下是与plot_grid共5行的25个图:

cowplot::plot_grid(plot_emmeans_N_L, plot_emmeans_N_L,
plot_emmeans_N_L,plot_emmeans_N_L,plot_emmeans_N_L,
plot_emmeans_N_L,plot_emmeans_N_L, plot_emmeans_N_L,
plot_emmeans_N_L,plot_emmeans_N_L,plot_emmeans_N_L,
plot_emmeans_N_L,plot_emmeans_N_L, plot_emmeans_N_L,
plot_emmeans_N_L,plot_emmeans_N_L,plot_emmeans_N_L, 
plot_emmeans_N_L,plot_emmeans_N_L, plot_emmeans_N_L,
plot_emmeans_N_L,plot_emmeans_N_L,plot_emmeans_N_L,
plot_emmeans_N_L,plot_emmeans_N_L, 
NULL,NULL,NULL, NULL, NULL, nrow = 5, ncol=6, align = "v")

相反,它变得更小:

enter image description here

r bookdown cowplot
1个回答
0
投票

最终,我最好的解决方案是使用拼凑图库和(平庸地)添加块选项fig.height= x, fig.width= y,这是所有图块的大小,如发布here

© www.soinside.com 2019 - 2024. All rights reserved.