-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Added tripcolor triangle-centred colour values. #850
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
|
I find the kwarg If you want to allow it to be short circuited to |
lib/matplotlib/tri/tripcolor.py
Outdated
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.
Note that elsewhere in pcolormesh, the faceted option has been deprecated for some time and recently removed in favor of respecting the edgecolors kwarg. Does that make sense to do here as well?
|
This looks like a nice improvement. In addition to my commented about |
|
Apologies for taking so long, but I have now addressed the comments. The changes are, in order of my commits:
Note that the edgecolors kwarg isn't supported for shading='gouraud'. It would be nice to support this, but I cannot see how without changing many files in the backend code. The behaviour is at least consistent with pcolormesh. I've noticed that pcolor doesn't support gouraud shading at all - I presume the conclusion here is that support for gouraud shading is patchy and needs to be reconsidered sometime. |
|
Thanks very much for the changes. |
|
I've rebased against master as requested. |
lib/matplotlib/tri/tripcolor.py
Outdated
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 think you mean "at triangulation points", not "at triangles"; the latter would be the same as using facecolors.
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.
You are correct; well spotted!
Added tripcolor triangle-centred colour values.
Deprecated in matplotlib#850 / 360887a Also added validation on value of shading to only be in the supported set. attn @ianthomas23
Deprecated in matplotlib#850 / 360887a Also added validation on value of shading to only be in the supported set. attn @ianthomas23
Deprecated in matplotlib#850 / 360887a Also added validation on value of shading to only be in the supported set. attn @ianthomas23
Deprecated in matplotlib#850 / 360887a Also added validation on value of shading to only be in the supported set. attn @ianthomas23
Deprecated in matplotlib#850 / 360887a Also added validation on value of shading to only be in the supported set. attn @ianthomas23
Implementation of issue #811.
triplotdetermines whether color values are specified at triangulation points or triangles based on the length of the color values array, as this is the most intuitive way to do it. The only complication is if there are the same number of points as triangles; in this case you may need to use thecolorpointskwarg as well. This is a little clumsy, but seems better than forcing the user to always use a kwarg to get the new behaviour.Existing code is unaffected by the change.