Skip to content

Unexpected behaviour when combine scales = "free" and axes = "all" #6900

Description

@see24

I love the new feature of being able to add axes and their labels to interior facets (See #4064). But it didn't combine as I expected when using scales = "free" as well.

This is an example with mpg:

library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.4.3
ggplot(mpg, aes(cty, manufacturer)) +
  geom_point() +
  facet_grid(year ~ drv, axes = "all", axis.labels = "all", scales = "free")

Created on 2026-09-14 with reprex v2.1.1

In my use case the separate panels are different versions of a model and the names on the y axis are terms in the model and the terms in the model vary in the different versions so it is confusing to have all of them labelled. It would be perfect if the labels could stay in the same location, so that one can read across a row to compare between facets, but with the labels blank for the manufacturer levels that are not present in that facet.

This only really makes sense with discrete variables but it would be super helpful!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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