Skip to content

Instantly share code, notes, and snippets.

@djnavarro
Created March 30, 2020 23:33
Show Gist options
  • Save djnavarro/39573665ce379465c8d12d786864c7bf to your computer and use it in GitHub Desktop.
Save djnavarro/39573665ce379465c8d12d786864c7bf to your computer and use it in GitHub Desktop.
library(jasmines)
library(dplyr)
# data structure to plot
dat <- use_seed(1) %>%
scene_bubbles(n = 3, grain = 10000) %>%
mutate(x = x * 2, y = y * 2) %>%
unfold_tempest(
iterations = 4,
scale = .05,
scatter = TRUE
) %>%
mutate(order = 1 + (id + time + (ceiling(ind/100))) %% 10)
# make the plot
dat %>%
style_ribbon(
palette = palette_manual(
"#FF0018", "#FFA52C", "#FFFF41", "#008018", "#0000F9",
"#86007D", "#F88BC2", "#47A9FA", "#000000", "#CA93CA"),
background = "white",
alpha = c(1, 0),
discard = 2,
) %>%
export_image("~/Desktop/rainbow_ribbon.png")
@djnavarro
Copy link
Author

rainbow_ribbon

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