簡體   English   中英

cowplot plot_grid自動縮小圖的大小

[英]cowplot plot_grid scales down size of plots automatically

我正在嘗試使用cowplot的功能plot_grid渲染一個包含6列的一系列25個圖的pdf。

我希望這些顯示的大小與如果我只有一行的顯示大小相同。 由於某些原因,盡管在添加新行時圖的大小變小了。 有我不知道的解決方案嗎? 以下是具有兩個結果的代碼。 提前謝謝了

僅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")

這里看起來如何: 在此處輸入圖片說明

這是帶有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")

相反,它的結果要小得多:

在此處輸入圖片說明

最終,我最好的解決方案是使用拼湊庫,並(通常)添加塊選項fig.height= x, fig.width= y ,這是所有圖的fig.height= x, fig.width= y ,如此處所示

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM