plt.pcolormesh and shape mismatch #740

Closed
gkuhl opened this Issue Mar 5, 2012 · 3 comments

3 participants

@gkuhl

The function "pcolormesh(X,Y,C)" will raise no ValueError, if the shapes of C and X,Y are not compatible. Instead a wrong plot will be produced. I suggest to raise a ValueError, if C has a shape of (n,m) and the shapes of X and Y or neither (n,m) nor (n+1,m+1).

@efiring
Matplotlib Developers member

This looks worth improving, with checks for all the pcolor-like methods. It is actually OK for either or both of the dimensions of C to be 1 less than the corresponding X and Y dimensions, unless gouraud shading is being used. All this will take a little care, and some tests. At the same time, pcolorfast argument handling might be improved.

@pelson
Matplotlib Developers member

Duplicate of #1688?

@efiring
Matplotlib Developers member
@efiring efiring closed this May 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment