-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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 |
set to *False*. | ||
|
||
*shading* may be 'flat' (the default), 'faceted' or 'gouraud'. If | ||
*shading* is 'flat' or 'faceted' and C values are defined at |
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. |
is 'flat' and C values are defined at points, the color values | ||
used for each triangle are from the mean C of the triangle's | ||
three points. If *shading* is 'gouraud' then color values must be | ||
defined at triangles. *shading* of 'faceted' is deprecated; |
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.
triplot
determines 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 thecolorpoints
kwarg 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.