Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pcolormesh edgecolors does not work correctly #901

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 1 commit into from
May 31, 2012

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented May 29, 2012

At the moment, the following code produces a mesh with black edges:

fig = plt.figure()
ax = fig.add_subplot(1,1,1)
x = np.linspace(-10., 10., 11)
y = np.linspace(-10., 10., 11)
ax.pcolormesh(x, y, np.ones((10, 10)), edgecolors='w')
fig.savefig('mesh.png')

Looking at the matplotlib code, it looks like the draw_quad_mesh renderer method should really take an argument for edgecolors rather than just setting the edges to black by default.

@ghost ghost assigned mdboom May 29, 2012
@mdboom
Copy link
Member

mdboom commented May 29, 2012

The attached PR should allow for passing edgecolors to pcolormesh. You can even pass a list of colors if you like.

efiring added a commit that referenced this pull request May 31, 2012
pcolormesh edgecolors does not work correctly
@efiring efiring merged commit efb68e0 into matplotlib:master May 31, 2012
efiring added a commit to efiring/matplotlib that referenced this pull request Jun 6, 2012
edgecolors='None' now must be included explicitly.  Even if
this change in the default is reverted, it makes sense for
colorbar to be explicit about it.
mdboom added a commit to mdboom/matplotlib that referenced this pull request Jun 7, 2012
…b#929.  The default behavior of pcolormesh should be to draw no edges if no `edgecolors` kwarg is provided.
mdboom added a commit that referenced this pull request Jun 7, 2012
efiring added a commit to efiring/matplotlib that referenced this pull request Jul 9, 2012
efiring added a commit that referenced this pull request Jul 9, 2012
@@ -7224,13 +7219,8 @@ def pcolormesh(self, *args, **kwargs):
coords[:, 0] = X
coords[:, 1] = Y

if shading == 'faceted' or edgecolors != 'None':
Copy link
Member

Choose a reason for hiding this comment

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

Direct "None" comparison excludes the use of the lowercase "none" equivalent. I will open a ticket for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Note this is a line that was removed, not introduced by this PR.

jenshnielsen added a commit to jenshnielsen/matplotlib that referenced this pull request Aug 31, 2012
…nged when matplotlib#901 and was

merged, to allow different edgecolors, due to the way get_edgecolors behave. This restors the
original behavior of colorbar in both mpl and the axisgrid1 toolkit by setting the edgecolor to 'face'
@mdboom mdboom deleted the quad_mesh_color branch March 3, 2015 18:44
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.

3 participants