Skip to content

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #6623.

Briefly, it populates named parameters to the scale constructors such that name is once again populated by the first unnamed argument (or the argument named 'name', of course).

Reprex from issue, note that all legends have the given names, rather than default labels:

devtools::load_all("~/packages/ggplot2/")
#> ℹ Loading ggplot2

ggplot(mtcars, aes(x = disp, y = hp, size = gear, colour = wt, fill = factor(cyl))) +
  geom_point(shape = 21) +
  scale_fill_discrete("Cylinders") + 
  scale_colour_continuous("Weight") + 
  scale_size_continuous("Gears")  

Created on 2025-09-24 with reprex v2.1.1

@teunbrand teunbrand added this to the ggplot2 4.0.1 milestone Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passing name to fill and colour scales as unnamed first argument is broken in 4.0.0

1 participant