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

fix: obtain expected quantity values from manual scale #5363

Closed
wants to merge 1 commit into from

Conversation

liang09255
Copy link

This pull request fixes a bug in the code and adds corresponding unit tests.

When we use manual_scale to create a discrete_scale, the palette should be a function that can return the specified number of values.

Here is the parameter description quoted from scale-.R:

@param palette A palette function that, when called with a single integer argument (the number of levels in the scale), returns the values that they should take (e.g., [scales::hue_pal()]).

The original manual_scale method simply returns all the values, whereas the modified method will return the first n values specified.

@liang09255 liang09255 closed this Jul 25, 2023
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.

1 participant