Skip to content

pcolormesh edgecolors does not work correctly - #901

Merged
efiring merged 1 commit into
matplotlib:masterfrom
mdboom:quad_mesh_color
May 31, 2012
Merged

efiring merged 1 commit into
matplotlib:masterfrom
mdboom:quad_mesh_color

Conversation

@mdboom

@mdboom mdboom commented May 29, 2012

Copy link
Copy Markdown
Member

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

mdboom commented May 29, 2012

Copy link
Copy Markdown
Member

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
Comment thread lib/matplotlib/axes.py

Copy link
Copy Markdown
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
Copy Markdown
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