-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
plt.pcolormesh shape mismatch when shading='gouraud' #8422
Copy link
Copy link
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: pcolor/pcolormesh
Milestone
Metadata
Metadata
Assignees
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: pcolor/pcolormesh
Bug report
Bug summary
When running
plt.pcolormesh(X, Y, C, shading='flat'), ifC.shape == (nrows, ncols), then ifXandYare 2-D arrays, their shapes must be either(nrows, ncols)or(nrows+1, ncols+1). Ifshading='gouraud', however, the latter results in an error. The code snippet below uses 1-D arrays forXandY, but the same error occurs when they are the equivalent 2-D arrays.Code for reproduction
Actual outcome
Expected outcome
I expected
pcolormeshwould accept the same arrays forXandY irrespective of the setting of theshading` keyword argument.Matplotlib version