-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Improve color scale documentation #4450
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
Improve color scale documentation #4450
Conversation
R/scale-colour.r
Outdated
#' [scale_fill_gradient()]). Note that both continuous and binned scales | ||
#' are configured with the same options values. In other words, | ||
#' the option `ggplot2.continuous.colour` controls the behavior of both | ||
#' `scale_colour_continuous()` and `scale_colour_binned()`. To manually set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be more correct to say that the binned scale falls back to ggplot2.continuous.colour
if ggplot2.binned.colour
is not set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, for some reason I missed this.
@thomasp85 I have fixed the issue you pointed out and generally expanded the documentation of |
This is kind of orthogonal to this PR, so sorry for hijacking it, but it occurs to me that the fallback to |
I agree with your comment, but that's a lot of logic for a default argument. Should I move that logic into the main body of the function? I don't like complex code execution in default arguments anyways. |
I think it is already way too much to have in the signature so it is better moved inside the function... But we should do this consistently then, maybe in a new PR |
That’s fine, I can do it. Can we merge this PR first? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let us just merge this in
Improve color scale documentation. Closes #4415.