Created
February 25, 2015 19:00
-
-
Save mplourde/9a1ac96cbce25dd8fc34 to your computer and use it in GitHub Desktop.
ggplot top Y-axis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x <- ggplot(mtcars, aes(x=mpg, y=disp, label=carb)) + | |
geom_point() + | |
geom_text(y=Inf, vjust=-.3) | |
g <- ggplotGrob(x) | |
g$layout$clip[g$layout$name == "panel"] = "off" | |
grid.draw(g) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment