Created
March 30, 2020 23:33
-
-
Save djnavarro/39573665ce379465c8d12d786864c7bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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") |
Author
djnavarro
commented
Mar 30, 2020

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