Created
September 4, 2018 17:27
-
-
Save wjakethompson/d0d645e142680546372eb83240e3ad1c to your computer and use it in GitHub Desktop.
This file contains 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
# inspired by https://twitter.com/mbostock/status/1036391604100055040 | |
library(tidyverse) | |
plot_data <- crossing(x = seq(-20, 20, 0.01), y = seq(-20, 20, 0.01)) %>% | |
mutate( | |
depth = sin(sin(x * (sin(y) - cos(x)))) - cos(cos(y * (cos(x) - sin(y)))) | |
) | |
ggplot(plot_data, aes(x = x, y = y)) + | |
geom_raster(aes(fill = depth), interpolate = TRUE) + | |
scale_fill_viridis_c(option = "C") + | |
theme_void() + | |
coord_equal() + | |
theme(legend.position = "none") |
Author
wjakethompson
commented
Sep 4, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment