Skip to content

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #5013.

Briefly, it implements the fix proposed here and polishes pal_qualitative() a little bit.

Tangentially related, shouldn't pal_qualitative() be a function in {scales}?

@@ -1,6 +1,5 @@
test_that("scale_hue() checks the type input", {
pal <- pal_qualitative(type = 1:4)
expect_snapshot_error(pal(4))
expect_snapshot_error(pal_qualitative(type = 1:4))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

error is now thrown in palette factory rather than the output function.

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

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

LGTM

@teunbrand teunbrand merged commit c8b8022 into tidyverse:main Aug 20, 2024
13 checks passed
@teunbrand teunbrand deleted the improve_pal_qualitative branch August 20, 2024 14:13
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.

unexpected behavior when setting named vector for default colour/fill
2 participants