Skip to content

Instantly share code, notes, and snippets.

@klainfo
Created August 12, 2015 19:41
Show Gist options
  • Save klainfo/3302f4cc8e31ee516f70 to your computer and use it in GitHub Desktop.
Save klainfo/3302f4cc8e31ee516f70 to your computer and use it in GitHub Desktop.
td <- expand.grid(
hjust=c(0, 0.5, 1),
vjust=c(0, 0.5, 1),
angle=c(0, 45, 90),
text="text"
)
ggplot(td, aes(x=hjust, y=vjust)) +
geom_point() +
geom_text(aes(label=text, angle=angle, hjust=hjust, vjust=vjust)) +
facet_grid(~angle) +
scale_x_continuous(breaks=c(0, 0.5, 1), expand=c(0, 0.2)) +
scale_y_continuous(breaks=c(0, 0.5, 1), expand=c(0, 0.2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment