pcolor problem

Hello everone,

I am trying to use pcolor from pylab but I can’t get it work. As you know signature of pcolor for Matlab is pcolor(x,y,data) which x and y are vectors. When I try pcolor(data)

it works but it is not what I want. Because without x,y vectors placed it is not generating correct result. when i put x and y vectors in place I get a ValueError: shape mismatch: objects cannot be broadcast to a single shape

but in matlab it is working with x , y vectors.

Any idea.

Thanks a lot for your time

pcolor(X,Y,reshaped) ----> reshaped is my data matrix

show()

Burak

Hello everone,

I am trying to use pcolor from pylab but I can't get it work. As you
know signature of pcolor for Matlab is pcolor(x,y,data) which x and y
are vectors. When I try pcolor(data)

it works but it is not what I want. Because without x,y vectors placed
it is not generating correct result. when i put x and y vectors in place
I get a ValueError: shape mismatch: objects cannot be broadcast to a
single shape

Right, because your x, y, and data don't have properly matching shapes.

http://matplotlib.org/api/axes_api.html?highlight=pcolor#matplotlib.axes.Axes.pcolor

The various ways to make them match are explained in the link above.

Note also that in most cases, using pcolormesh provides the desired result but with a much faster implementation. Pcolor is slow, and should be used only for rather small arrays.

Eric

···

On 2013/01/19 3:59 AM, burak nebioğlu wrote:

but in matlab it is working with x , y vectors.

Any idea.

Thanks a lot for your time

pcolor(X,Y,reshaped) ----> reshaped is my data matrix
show()

Burak

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options