Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility current ggplot2 #410

Merged
merged 5 commits into from
Mar 12, 2025
Merged

Conversation

teunbrand
Copy link
Contributor

This PR fixes an issue discussed off-github between Hadley and me.
Briefly, it repairs some code that has become desyncronised over development.

@@ -264,14 +266,16 @@ linetypes <- function(n) {
return(types[seq_len(n)])
}

base + scale_linetype(palette = linetypes)
base + discrete_scale("linetype", palette = linetypes)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per tidyverse/ggplot2#5991 (comment), this usage was incorrect but behaved correctly by accident. There currently isn't a linetype scale template that allows setting palettes directly, as is the case for many aesthetics IIRC. We can enable this, but it'd have to wait for the next release.

@hadley hadley merged commit 34b224a into hadley:main Mar 12, 2025
1 of 2 checks passed
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.

2 participants