Skip to content

Instantly share code, notes, and snippets.

@MattSandy
Last active November 9, 2018 06:13
Show Gist options
  • Save MattSandy/162c24378d21e9f4ce00ac0c681657ba to your computer and use it in GitHub Desktop.
Save MattSandy/162c24378d21e9f4ce00ac0c681657ba to your computer and use it in GitHub Desktop.
ggplot clock
ggplot(data.frame(t = c(1:60)),aes(t,3)) + geom_point() +
geom_point(data = data.frame(t = c(seq(0,11)*5),3),
aes(t,3,color=factor(t)), size=5) +
coord_polar() +
scale_x_continuous(labels = c(12,3,6,9),
breaks = c(0,15,30,45)) +
scale_y_continuous(limits = c(0,3)) +
theme_bw(base_size = 22) +
theme(title = element_blank(),
legend.key = element_blank(),
legend.position = "none",
axis.text.y = element_blank(),
axis.ticks = element_blank(),
panel.border = element_blank())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment