Skip to content

FIX: colormapping of integer normed images #6581

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 7 commits into from
Jul 6, 2016

Conversation

tacaswell
Copy link
Member

This is a work in progress and will hopefully be a starting point for @mdboom to fix it properly 😄

  • Use the same trick for carrying through the masked points to use the green and blue channels to carry the under/over markers.

Starts to address #6509

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Jun 14, 2016
@mdboom
Copy link
Member

mdboom commented Jun 21, 2016

Tried to make a PR against this, but we have too many contributors... ? ;)

Check out my branch for an additional fix for boundary norm: https://github.com/mdboom/matplotlib/tree/image-over-under

@tacaswell
Copy link
Member Author

You have to just edit the URL. They are aware of the problem, conclude it affects about 15 projects and oh well.

@efiring
Copy link
Member

efiring commented Jun 21, 2016

@tacaswell, https://github.com/efiring/matplotlib/tree/tacaswell-fix_over_under_images has my proposed fix on top of yours. I don't quite understand the procedure for handling such combinations of commits; maybe it is simplest at this point for you to pull my commit from my tree and add it to this PR. I haven't done any testing other than verifying that it makes 'image_masked.py' work.

tacaswell and others added 3 commits June 28, 2016 23:25
Use the same trick for carrying through the masked points to use the
green and blue channels to carry the under/over markers.
@tacaswell tacaswell force-pushed the fix_over_under_images branch from c1ec9fa to 1ec7071 Compare June 29, 2016 03:28
@tacaswell
Copy link
Member Author

@efiring @mdboom I have pulled Eric's commits into this branch (and re-based onto current v2.x).

For the next person who has to read this code.
@tacaswell tacaswell changed the title WIP: fix colormapping in images FIX: colormapping of integer normed images Jun 29, 2016
elif A.ndim == 3:
# colormap norms that output integers (ex NoNorm
# and BoundaryNorm) to RGBA space before
# interpolating. This is needed due to the the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two 'the's.

@jenshnielsen
Copy link
Member

Tests would be nice. At least an image comparison test based on the example in #6509 seems like a good idea

@tacaswell
Copy link
Member Author

I'll add tests + fix the text tonight.

@mdboom
Copy link
Member

mdboom commented Jun 30, 2016

I've said this "in person", but for the written record -- this seems like the right approach to me. I'm 👍 on merging this, modulo everyone else's comments above.

@mdboom mdboom merged commit b2b37fb into matplotlib:v2.x Jul 6, 2016
@tacaswell tacaswell deleted the fix_over_under_images branch July 6, 2016 15:24
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.

5 participants