Skip to content

Instantly share code, notes, and snippets.

@mtaylor-semo
Last active February 2, 2019 20:25
Show Gist options
  • Save mtaylor-semo/e2362171f774b400a58c2563a3ec972e to your computer and use it in GitHub Desktop.
Save mtaylor-semo/e2362171f774b400a58c2563a3ec972e to your computer and use it in GitHub Desktop.
Blacklight Ctenophore
# Inspired by https://twitter.com/aschinchon/status/1090724402881314819
# Colors https://www.colourlovers.com/palette/565792/glow!!!!!!!!!!!!!!!!
library(tidyverse)
p1 <- seq(from = -5, to = 5, by = 0.02) %>%
expand.grid(x = ., y = .) %>%
ggplot() +
geom_point(aes(y = (y + (1-cos(x)^3)),
x = (x + (1-sin(y))^3)),
alpha = 0.05,
shape = 20,
size = 0.1,
color = "#AC05FF") +
theme_void() +
theme(panel.background = element_rect(fill = 'black',colour = 'black')) +
coord_cartesian()
p2 <- seq(from = -5, to = 5, by = 0.02) %>%
expand.grid(x = ., y = .) %>%
ggplot() +
geom_point(aes(y = (y - (1+cos(x)^3)),
x = (x - (1+sin(y))^3)),
alpha = 0.02,
shape = 20,
size = 0,
color = "#FFC905") +
theme_void() +
theme(panel.background = element_blank())
PB = ggplotGrob(p2)
p1 + annotation_custom(grob = PB)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment