-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Adds support for rgba and rgb images to pcolorfast #8690
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
Please look again at the discussion in #1317. This simple 1-line change, by itself, is not enough. |
I have read the discussion, and I agree the one line is not enough, though it fixes half of the problem, instead of none of it as it has been for the last years, while generating an exception (as it does now) for some complicated grids. This PR fixes problems I had with the code, and would for others as well. |
Reading the discussion, it seems like there wasn't anything against making this particular change, though. |
Correct. It just needs a complete PR, with more than the one-line change.
|
Thank you @efiring for being explicit in what changes you were requesting... 😁 |
Thank you @efiring for specifying what you wanted. |
I see this was not part of the v/2.2 release. What is needed to get this into matplotlib? |
Needs a rebase, but I think something like this can go in? Possibly with some tests as well... |
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.
In addition to the minor doc edits, rebase, and updating the api_changes filename, I recommend adding a test.
I've added a test, minor doc change and rebased. |
Also, consider perhaps squashing your commits. |
I would like something like this to make it to 3.1, especially considering that it's quite close to being mergeable. Feel free to remilestone if you disagree. |
I've addressed the comments from @anntzer. |
Only one minor comment left, you can fix and squash. |
Feel free to re-milestone if this gets done sooner, but I don't think its urgent... |
I've changed the last comment, but I having problems squashing the pull request due to the rebases (4300 commands that git needs to do). This could be due to my inexperience in squashing. If it can't be done in when you merge the code into master, my solution would be to close this and move the code to a new pull request based on the latest master |
Do you mind if I force-push to your branch to fix that? |
@anntzer Go ahead, you're more than welcome. |
Added doc string and raise of error for quadmesh Added test for RGB image in pcolorfast Added doc changes per efirings comments Doc change and use of pytest.raises Changed from TypeError to ValueError Removed whitespace Doc changes in response to comments Doc modified
Rebased. |
Good to go for 3.1.0 IMO. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
Adds support for rgba and rgb images to pcolorfast Conflicts: lib/matplotlib/axes/_axes.py - C.shape -> np.shape(C) bug fix was not backported
…v3.1.x Backport PR #8690 on branch v3.1.x
Resolved all conflicts in favor of the master branch except for the changes to doc/api/prev_api_changes/api_changes_3.1.0.rst pcolorfast was updating to take RGB(A) in some cases in PR matplotlib#8690 / 94b0bca that was backported to v3.1.x via matplotlib#13709 / afc4e61 . However, the functionality was further extended in matplotlib#13986 / c05537d which was not backported. When merging v3.1.x into master special care had to be taken to not pull the removed code back into master.
PR Summary
This pull request fixes issue #1317, by making nr, and nc equal to the first and second element of C.shape.
Through this, pcolorfast now works on RGBA arrays, i.e. NxMx3 or NxMx4.
PR Checklist