Question: I am trying to plot data with coordinates over a map. And I kept getting this error: TypeError Traceback (most recent call last) in 1

I am trying to plot data with coordinates over a map. And I kept getting this error:

TypeError Traceback (most recent call last) 
 in  1 # Plot data ----> 2 cs = m.pcolor(x, y, np.squeeze(da)) 3 4 # Add grid lines 5 m.drawparallels(np.arange(-80., 81., 10.), labels=[1,0,0,0], fontsize=10) 

4 frames

/usr/local/lib/python3.8/dist-packages/matplotlib/axes/_axes.py in _pcolorargs(funcname, allmatch, *args) 5702 else: 5703 if not (ncols in (Nx, Nx - 1) and nrows in (Ny, Ny - 1)): -> 5704 raise TypeError('Dimensions of C %s are incompatible with' 5705 ' X (%d) and/or Y (%d); see help(%s)' % ( 5706 C.shape, Nx, Ny, funcname)) 
TypeError: Dimensions of C (720, 360) are incompatible with X (720) and/or Y (360); see help(pcolor)

May I know how can I fix this?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!