# NOT RUN {
library(ggplot2)
p <- ggplot(mpg, aes(displ, cty)) +
geom_point()
ggdraw(get_y_axis(p))
p <- p + scale_x_continuous(position = "top")
ggdraw(get_x_axis(p, position = "top"))
# }
Run the code above in your browser using DataCamp Workspace