-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix a bug in ScaleBinned$get_breaks() #3575
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 a bug in ScaleBinned$get_breaks() #3575
Conversation
I think we'd need to check if the breaks function support two arguments before calling it with |
I think the breaks function with two arguments can work well. The brk function can be also used in other scales whose breaks function only need a single argument, because n.breaks has a default value.
|
What I mean is that your change will mean that if you pass in a breaks function that only accepts a single argument it will fail. This runs counter to the expectations of the breaks function |
oh, I know what you mean now~ maybe, we can handle it in some way like: Lines 955 to 956 in 115c396
|
yeah, something like that |
OK, thanks for your reply! How can I finish the work? should I open a new pull request? |
@microly Just make additional changes to the code, commit, push, and the PR will update. Don't open a new PR. |
@clauswilke By the way, cowplot is one of the most important package in my daily work, thanks for your great |
update to check if the breaks function support two arguments before calling it with n.breaks.
@thomasp85 |
Thanks! |
thanks for your work! |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
1 similar comment
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
this pull request try to fix the bug in issue #3574 .
I set n.breaks as the second parameter of breaks function.
if the n.breaks is not set by users, it will set to the default value 5, which is the same default as trans objects.
n.breaks can be set by end users.
So, after this fix, users can get meaningful breaks by set breaks as a function and get meaningful breaks using the values of limits and n.breaks.