Add support for coord_flip

This commit is contained in:
Winston Chang
2016-09-27 23:04:30 -05:00
parent 24e8123240
commit 008fe38f10

View File

@@ -611,6 +611,11 @@ getGgplotCoordmap <- function(p, pixelratio, res) {
)
}
# Look for CoordFlip
if (inherits(b$plot$coordinates, "CoordFlip")) {
mappings[c("x", "y")] <- mappings[c("y", "x")]
}
mappings_cache <<- mappings
mappings
}