Separate y axis for different facets in ggplot

ggplot2, r

Solution

You can change `scales` to "free_y" instead.

  facet_grid(facets, margins = FALSE, scales = "fixed",
    space = "fixed", shrink = TRUE,
    labeller = "label_value", as.table = TRUE, drop = TRUE)

For further detail and examples, see: https://ggplot2.tidyverse.org/reference/

Problem

I would like to create a plot using ggplot where different facets should have different y axis limits. By default each facet has the same y axis values. can this be changed somehow?

Original source