Skip to content

Instantly share code, notes, and snippets.

@ericnovik
Created October 1, 2018 23:20
Show Gist options
  • Save ericnovik/024820759e8d902b9cd7ab890103dd9a to your computer and use it in GitHub Desktop.
Save ericnovik/024820759e8d902b9cd7ab890103dd9a to your computer and use it in GitHub Desktop.
library(cowplot)
n <- 1e4
X <- rlogis(n)
Y <- plogis(X)
plot_dens <- function(data, ...) {
qplot(
data,
geom = "histogram",
alpha = I(1 / 2),
...
) + xlab("")
}
pl <- plot_dens(X) + ggtitle("Logistic Distribution")
pu <- plot_dens(Y) + ggtitle("Uniform from Logistic")
plot_grid(pl, pu)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment