Skip to content

Commit c6c4665

Browse files
committed
Merge branch 'chrismerkord-master'
2 parents 399f90d + 8e93597 commit c6c4665

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ggplot2 2.0.0.9000
22

3+
* `facet_wrap()` correctly swaps `nrow` and `ncol` for facetting vertically
4+
(#1417).
5+
36
* For geoms with both `colour` and `fill`, `alpha` once again only affects
47
fill (Reverts #1371, #1523). This was causing problems for people.
58

R/facet-wrap.r

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ facet_wrap <- function(facets, nrow = NULL, ncol = NULL, scales = "fixed",
8686

8787
if (identical(dir, "v")) {
8888
# swap
89-
nrow <- sanitise_dim(ncol)
90-
ncol <- sanitise_dim(nrow)
89+
nrow_swap <- ncol
90+
ncol_swap <- nrow
91+
nrow <- sanitise_dim(nrow_swap)
92+
ncol <- sanitise_dim(ncol_swap)
9193
} else {
9294
nrow <- sanitise_dim(nrow)
9395
ncol <- sanitise_dim(ncol)

0 commit comments

Comments
 (0)