nrow and ncol are not swapped correctly for vertical facetting #1417
There's a bug in facet-wrap.r on lines 89-90 that is not apparent unless you use an nrow other than what it defaults to when nrow is NULL. For example, try:
you should get a figure with 2 rows. Instead the figure has 3 rows. Inspecting the plot shows that nrow and ncol both have a value of NULL.
Likewise when you run
both nrow and ncol are 2 when it should be nrow == 2 and ncol == NULL.
The problem is that the swap code always results in nrow and ncol being equal or both being NULL, depending on which argument is defined:
You'll have to create a dummy variable to swap them, e.g.:
I mentioned this in #1279 but I should have started a new issue instead.
The text was updated successfully, but these errors were encountered: