Skip to content

facet_grid(scales = "free") not working #5384

@jromanowska

Description

@jromanowska

I found a problem with facet_grid when setting scales argument to "free".

I expected both, x and y, vary between the panels of the plot, but only one of them vary.

Here is the code to reproduce the bug (using the code from examples in documentation of facet_grid):

mt <- ggplot(mtcars, aes(mpg, wt, colour = factor(cyl))) +
   geom_point()
# first - checking the fixed scales:
mt + facet_grid(vars(cyl), scales = "fixed") # all fine
# checking other 'free' options:
mt + facet_grid(vars(cyl), scales = "free_y") # all fine
mt + facet_grid(vars(cyl), scales = "free_x") # not working
mt + facet_grid(vars(cyl), scales = "free")  # not working

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions