坐标默认是从上到下,从左到右,例如
:
matplotlib.pyplot.imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None,
vmin=None, vmax=None, origin=None, extent=None, shape=None,
filternorm=1, filterrad=4.0, imlim=None, resample=None,
url=None, hold=None, data=None, **kwargs
他的参数很多,找了很久,才发现,应该是设置origin
参数。
origin : [‘upper’ | ‘lower’], optional, default: None
Place the [0,0] index of the array in the upper left or lower left corner of the axes.
If None, default to rc image.origin.
设origin=‘lower’
,就得到如下图: