-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ggarrange fails if eiter ncol = 1
or nrow = 1
#144
Comments
+1, except that it's not just a matter of ncol/nrow = 1. This happens when only ncol or only nrow is specified. i.e., |
In the current version:
In your example, the following R code should work: # Arrange two plots in two successive columns
ggpubr::ggarrange(fig_1, fig_1, ncol = 2)
# Arrange two plots in two successive rows
ggpubr::ggarrange(fig_1, fig_1, nrow = 2) I will update ggarrange(), so that it can automatically guess the correct layout for the options |
fixed now thanks |
I had the same error as GegznaV ( running ‘4.1.3’ in Rstudio), but it worked when I supplied 1.5. It would not show in Rstudio's viewing window when I set nrow =2 & ncol =1. It worked when printed to pdf.
|
In the example below
ggarrange
fails to create a single plot if eiterncol = 1
ornrow = 1
:I by specifying
ncol = 1
I expected all plots on one page arranged in one column. But the result is two separate plots and the output in the console:This should either be fixed (preferred), or a meaningful warning message should appear with explanations what happened, or, if the behavior I described is expected, more information should be included in the documentation.
In the situation:
A meaningful error message that
nrow
must be > 0 would also be preffered instead ofError in 1:(rows * cols) : NA/NaN argument
.The text was updated successfully, but these errors were encountered: