Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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")
@wjakethompson

This comment has been minimized.

Copy link
Owner Author

commented Sep 4, 2018

contour_plot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.