-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Documented the incompatibility of shrink and cax kwargs in colorbar. #9456
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
Conversation
lib/matplotlib/colorbar.py
Outdated
@@ -180,6 +180,9 @@ | |||
to which the colorbar is attached; but it is a manual method requiring |
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.
I'd actually drop this part. *shrink*
means to shrink for many reasons. I routinely shrink my colorbars for esthetic reasons that have nothing to do w/ the size of the mappable. I don't see why this note is here.
lib/matplotlib/colorbar.py
Outdated
@@ -180,6 +180,9 @@ | |||
to which the colorbar is attached; but it is a manual method requiring | |||
some trial and error. If the colorbar is too tall (or a horizontal | |||
colorbar is too wide) use a smaller value of *shrink*. | |||
Further, *shrink* and *cax* kwargs are incompatible with each other and |
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.
"Further, shrink " -> "The shrink". Take or leave this, but "further" is kind of awkward unless really needed...
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.
I'd actually just replace this whole paragaph with: "Note that if cax is specified it determines the size of the colorbar and shrink and aspect kwargs are ignored"
If you are going to point this out for shrink it should also be pointed out for aspect.
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.
Replaced with "The shrink kwarg provides a simple way to scale the colorbar with respect
to the axes. Note that if cax is specified it determines the size of the
colorbar and shrink and aspect kwargs are ignored."
If this is okay, shall I submit another pull request?
lib/matplotlib/colorbar.py
Outdated
@@ -180,6 +180,9 @@ | |||
to which the colorbar is attached; but it is a manual method requiring | |||
some trial and error. If the colorbar is too tall (or a horizontal | |||
colorbar is too wide) use a smaller value of *shrink*. | |||
Further, *shrink* and *cax* kwargs are incompatible with each other and |
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.
I'd actually just replace this whole paragaph with: "Note that if cax is specified it determines the size of the colorbar and shrink and aspect kwargs are ignored"
If you are going to point this out for shrink it should also be pointed out for aspect.
…he documentation.
Thanks @navdeeprana ! |
PR Summary
PR Checklist