I have the following pseudocode where I want to plot multiple histograms in a 4x8 grid. The length of vector cols is 32.
When I run this code it doesn't plot anything.
How can I fix this? Do i need to do some sort of facet? Not sure how to proceed.
par(mfrow = c(4,8))
cols <- t$label
for (i in cols) {
df |>
dplyr::filter(label == i) |>
dplyr::select(count_col) |>
ggplot2::ggplot(ggplot2::aes(x = count_col)) +
ggplot2::geom_histogram() +
ggplot2::ggtitle(i)
}
