Clarify doc for "norm" kwarg to `imshow`. #6826

Merged
merged 1 commit into from Jul 25, 2016

Conversation

Projects
None yet
5 participants
Contributor

anntzer commented Jul 24, 2016

"norm" also applies when X is a 2D-array of integers -- i.e, similarly
to the "cmap" kwarg. Make the docs for the two kwargs consistent.

mdboom added the needs_review label Jul 24, 2016

Owner

efiring commented Jul 25, 2016

There is more that needs to be fixed in the imshow docstring. It is not taking into account that MxN can be an integer array if norm is NoNorm. Also the "luminance (grayscale...)" is confusing, since it is generally not intended to indicate gray, and it is not really luminance--it is simply the input to the (norm, cmap) combination.

Contributor

anntzer commented Jul 25, 2016

(If you have specific edits to suggest, please post them as diffs (or PR to my repo but that's a bit overkill).)

Owner

efiring commented Jul 25, 2016

Here's a diff for _axes.imshow:
imshow_Xdoc_diff.txt
Of course, looking down a little farther one sees no end of other docstrings needing work.
It would be nice to be able to factor out some of the common chunks, such as the descriptions of cmap and norm.

@anntzer anntzer Clarify doc for "norm" kwarg to `imshow`.
"norm" also applies when X is a 2D-array of integers -- i.e, similarly
to the "cmap" kwarg.  Make the docs for the two kwargs consistent.
16abfd3

@tacaswell tacaswell merged commit bae8333 into matplotlib:master Jul 25, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 70.349%
Details

tacaswell removed the needs_review label Jul 25, 2016

@tacaswell tacaswell added a commit that referenced this pull request Jul 25, 2016

@tacaswell tacaswell Merge pull request #6826 from anntzer/clarify-imshow-norm-docstring
DOC: Clarify doc for "norm" kwarg to `imshow`.
4c4ead5
Owner

tacaswell commented Jul 25, 2016

backported to v2.x as 4c4ead5

anntzer deleted the anntzer:clarify-imshow-norm-docstring branch Jul 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment