# NOT RUN {
# Plot iris data
plot_histogram(iris)
# Plot random data with customized geom_histogram settings
set.seed(1)
data <- cbind(sapply(seq.int(4L), function(x) {rnorm(1000, sd = 30 * x)}))
plot_histogram(data, breaks = seq(-400, 400, length = 50))
# Plot histogram with preset ggplot2 themes
library(ggplot2)
plot_histogram(data, ggtheme = theme_light())
plot_histogram(data, ggtheme = theme_minimal(base_size = 15))
# Plot histogram with customized theme components
plot_histogram(data,
theme_config = list(
"plot.background" = element_rect(fill = "yellow"),
"aspect.ratio" = 1
))
# }
Run the code above in your browser using DataLab