GGPLOT - coord_fixed

Creates cartesian coordinates with fixed "aspect ratio" and then convert them with ggplotly.

p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <-  p + coord_fixed(ratio = 1)
plotly::ggplotly(p)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <-  p + coord_fixed(ratio = 5)
plotly::ggplotly(p)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <-  p + coord_fixed(ratio = 1/5)
plotly::ggplotly(p)
p <- ggplot(mtcars, aes(mpg, wt)) + geom_point()
p <-  p + coord_fixed(xlim = c(15, 30))
plotly::ggplotly(p)