R/api.R
coord_flip.Rd
Draws the plot with x and y swapped — the usual way to get horizontal bars or a readable categorical axis with long labels.
coord_flip()
A CoordCartesian object to add with +.
+
d <- data.frame(g = c("alpha", "beta", "gamma"), v = c(3, 7, 5)) ggnext(d, aes(g, v)) + geom_col() + coord_flip() #> <ggnext plot> #> data: 3 x 2 #> aes: x = g, y = v #> layers: 1 #> coord: flip #> mode: static