Skip to content

Commit 36e08b6

Browse files
thomasp85hadley
authored andcommitted
Coord polar fix (#1856)
* Switch position in case of coord_polar(theta='y')
1 parent c0d8f10 commit 36e08b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/layout.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Layout <- ggproto("Layout", NULL,
129129
coord$train(list(x = self$panel_scales$x[[ix]], y = self$panel_scales$y[[iy]]))
130130
}
131131
# Switch position of all scales if CoordFlip
132-
if (inherits(coord, "CoordFlip")) {
132+
if (inherits(coord, "CoordFlip") || (inherits(coord, "CoordPolar") && coord$theta == "y")) {
133133
lapply(self$panel_scales$x, function(scale) {
134134
scale$position <- if (scale$position == "top") "bottom" else "top"
135135
})

0 commit comments

Comments
 (0)