xray.DataArray.plot_imshow

DataArray.plot_imshow(darray, ax=None, xincrease=None, yincrease=None, add_colorbar=True, **kwargs)

Image plot of 2d DataArray using matplotlib / pylab

Wraps matplotlib.pyplot.imshow

..warning::
This function needs uniformly spaced coordinates to properly label the axes. Call DataArray.plot() to check.

The pixels are centered on the coordinates values. Ie, if the coordinate value is 3.2 then the pixels for those coordinates will be centered on 3.2.

Parameters:

darray : DataArray

Must be 2 dimensional

ax : matplotlib axes object, optional

If None, uses the current axis

xincrease : None, True, or False, optional

Should the values on the x axes be increasing from left to right? if None, use the default for the matplotlib function

yincrease : None, True, or False, optional

Should the values on the y axes be increasing from top to bottom? if None, use the default for the matplotlib function

add_colorbar : Boolean, optional

Adds colorbar to axis

**kwargs : optional

Additional arguments to wrapped matplotlib function

Returns:

artist :

The same type of primitive artist that the wrapped matplotlib function returns