Skip to content

Instantly share code, notes, and snippets.

@geotheory
Last active June 1, 2020 10:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save geotheory/5465830b2c6c5f674e87596110bf1428 to your computer and use it in GitHub Desktop.
Save geotheory/5465830b2c6c5f674e87596110bf1428 to your computer and use it in GitHub Desktop.
require(ggplot2)
ggplot() + annotate(x = -10, y=1, xend = -1.38, yend=3, geom='segment', col='white') +
geom_segment(data = data.frame(id=1:30, x = -1.38, y = seq(3.0, 3.0, len=30),
xend = seq(1.1, 1.4, len=30), yend = seq(3.5, 3.0, len=30)),
aes(x, y, xend=xend, yend=yend, col=factor(id))) +
geom_segment(data = data.frame(x = -1.38, y = seq(3.0, 3.0, len=30),
xend = seq(1.4, 1.1, len=30), yend = seq(3.0, 3.5, len=30)),
aes(x, y, xend=xend, yend=yend), col='#00000080') +
geom_segment(data = data.frame(x = -1.38, y = seq(3.0, 3.0, len=30),
xend = seq(1.4, 1.1, len=30), yend = seq(3.0, 3.5, len=30)),
aes(x, y, xend=xend, yend=yend), col='#ffffff20') +
geom_segment(data = data.frame(id=1:30, x = seq(1.1, 1.35, len=30), y = seq(3.5, 3.0, len=30),
xend = seq(10, 10, len=30), yend = seq(2.0, 1.0, len=30)),
aes(x, y, xend = xend, yend = yend, col = factor(id))) +
geom_path(data=NULL, aes(c(-3, 0, 3, -3), y = c(0,5.5,0,0)), col='white') +
scale_color_manual(values = rainbow(30, end = .7)) +
scale_y_continuous(limits = c(-3,8)) +
coord_equal() + theme_void() + theme(plot.background = element_rect(fill='black')) +
guides(col=F)
@geotheory
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment