basemap
basemap copied to clipboard
pcolormesh can't shiftdata when X,Y are 1 larger than data
The pcolormesh docs (as noted in this issue https://github.com/matplotlib/basemap/issues/107) explain that:
"Ideally the dimensions of x and y should be one greater than those of data; if the dimensions are the same, then the last row and column of data will be ignored."
However when I actually try and use Basemap pcolormesh with this shape array, the shiftdata method sometimes fails because the data is not the same shape:
import numpy as np
from mpl_toolkits.basemap import Basemap
x = np.arange(-179, 191, 10)
y = np.array([50, 51, 52])
data = np.ones((2, 36))
xv, yv = np.meshgrid(x, y)
map = Basemap()
map.pcolormesh(xv, yv, data, latlon=True)
results in this error (in 1.0.7):
IndexError: Inconsistant shape between the condition and the input (got (3, 37) and (2, 36))
Looks like this is still an issue. I (sometimes!) get the following error when trying to create a basemap:
IndexError: Inconsistant shape between the condition and the input (got (181, 361) and (180, 360))