Skip to content

the default value of ScaleBinned$n.breaks should be 4, not 5. #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

microly
Copy link
Owner

@microly microly commented Oct 21, 2019

The default value of ScaleBinned$n.breaks was set to the same as trans objects.
The default value of trans objects can map data to 5 colours in plot and legend, which is a direct-viewing color display.

However, when n.breaks is set to 5, ScaleBinned will map the data to 6 colours!
This occur in the codes:
https://github.com/tidyverse/ggplot2/blob/115c3960d0fd068f1ca4cfe4650c0e0474aabba5/R/scale-.r#L914
and
https://github.com/tidyverse/ggplot2/blob/115c3960d0fd068f1ca4cfe4650c0e0474aabba5/R/scale-.r#L928

So I think the default value of ScaleBinned$n.breaks should be 4, not 5, then it can works the same way as trans objects.

The default value of ScaleBinned$n.breaks was set to the same as trans objects.
The default value of trans objects can map data to 5 colours in plot and legend, which is a direct-viewing color display.

However, when n.breaks is set to 5, ScaleBinned will map the data to 6 colours!
This occur in the codes:
https://github.com/tidyverse/ggplot2/blob/115c3960d0fd068f1ca4cfe4650c0e0474aabba5/R/scale-.r#L914
and
https://github.com/tidyverse/ggplot2/blob/115c3960d0fd068f1ca4cfe4650c0e0474aabba5/R/scale-.r#L928

So I think the default value of ScaleBinned$n.breaks should be 4, not 5, then it can works the same way as trans objects.
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