imshow¶
- imshow(*im, ind=None, axis=None, **kwargs)[source]¶
Convenience wrapper for matplotlib’s
imshow
.This automatically:
slices a 3D image in the middle of the last axis
uses a masked array to make 0’s white
sets the origin to ‘lower’ so bottom-left corner is [0, 0]
disables interpolation
- Parameters:
im (ndarray) – The 2D or 3D image (or images) to show. If 2D then all other arguments are ignored.
ind (int) – The slice to show if
im
is 3D. If not given then the middle of the image is used.axis (int) – The axis to show if
im
is 3D. If not given, then the last axis of the image is used, so an ‘lower’ slice is shown.**kwargs – All other keyword arguments are passed to
plt.imshow
Note
im
can also be a series of unnamed arguments, in which case all received images will be shown usingsubplot
.Examples
Click here to view online example.