scenarios when using `ggplot2` to create faceted bar charts with varying y-axis limits in R
I'm trying to create faceted bar charts using `ggplot2` where each facet has a different y-axis limit based on the data it represents. However, I'm running into an scenario where the y-axis limits do not seem to respect the individual scales for each facet, and they end up being uniform across all facets. I've tried using the `scales = "free_y"` argument in `facet_wrap()`, but it doesn't seem to work as expected. Here's a minimal example of my code: ```r library(ggplot2) df <- data.frame( category = rep(c("A", "B", "C"), each = 10), value = c(runif(10, 1, 10), runif(10, 20, 30), runif(10, 30, 50)) ) p <- ggplot(df, aes(x = category, y = value)) + geom_bar(stat = "identity") + facet_wrap(~ category, scales = "free_y") print(p) ``` In this example, I expect each category to have its own y-axis scale based on the `value` range, but I still see the same scale across all facets. The behavior message I sometimes receive is: "behavior in eval(expr, envir, parent.frame()) : object 'value' not found" when I try to manipulate the data further. I've looked at various forums and documentation but haven't found a clear solution. Any insights on how I can achieve this and properly set the y-axis limits for each facet individually would be greatly appreciated!