8000 Documented the incompatibility of shrink and cax kwargs in colorbar. by navdeeprana · Pull Request #9456 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 3 commits into from
Oct 18, 2017
Merged

Documented the incompatibility of shrink and cax kwargs in colorbar. #9456

merged 3 commits into from
Oct 18, 2017

Conversation

navdeeprana
Copy link

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@@ -180,6 +180,9 @@
to which the colorbar is attached; but it is a manual method requiring
Copy link
Member
@jklymak jklymak Oct 17, 2017

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.

@@ -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
Copy link
Member

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...

Copy link
Member

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.

Copy link
Author
@navdeeprana navdeeprana Oct 18, 2017

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?

@@ -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
Copy link
Member

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.

@NelleV
Copy link
Member
NelleV commented Oct 18, 2017

Thanks @navdeeprana !

@NelleV NelleV merged commit 075618b into matplotlib:master Oct 18, 2017
@navdeeprana navdeeprana deleted the document-shrink branch October 18, 2017 16:54
@QuLogic QuLogic added this to the v2.2 milestone Oct 18, 2017
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
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.

4 participants
0