Skip to content

Instantly share code, notes, and snippets.

@mplourde
Created February 25, 2015 19:00
Show Gist options
  • Save mplourde/9a1ac96cbce25dd8fc34 to your computer and use it in GitHub Desktop.
Save mplourde/9a1ac96cbce25dd8fc34 to your computer and use it in GitHub Desktop.
ggplot top Y-axis
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