Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
;O{) # o-----\. # /.;/?}
library(tidyverse)
plot.new()
par(bg = "black")
plot(density(rweibull(1e6, 2, 0.1)), col = "pink3", lwd = 1, ylim = c(0, 20),
xlab = "", ylab = "", main = "Weibull distribution", axes = FALSE)
seq(1, 5, 0.25) %>%
map(function(x){ rweibull(1e6, x, 0.1)}) %>%
map(function(x) { density(x) %>%
lines(col = sample(colors(), 1),
lwd = sample(seq(0.1, 3, 0.1), 1),
lty = sample(1:9, 1))}) %>%
invisible() # ;O{)
# o-----\.
# /.;/?}
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.