showit
simple and sensible display of images in python
Really simple image display with matplotlib
. Just shows images. No axes, no interpolation, no frills.
install
pip install showit
usage
image
displays a 2D or 3D array as an image
from numpy import random
from showit import image
im = random.rand(25, 25, 3)
image(im)
options
-
cmap
: color map to use (defaultgray
) -
bar
: whether to show a color bar (defaultFalse
) -
nans
: whether to replace NaNs with 0 (defaultTrue
) -
clim
: limit for colormap (defaultNone
) -
size
: size of figure (default7
) -
ax
: an existing axis to plot into (defaultNone
)
tile
displays multiple 2D or 3D images as tiles in a grid
from numpy import random
from showit import tile
ims = random.rand(9, 25, 25, 3)
tile(ims)
options
-
cmap
: color map to use (defaultgray
) -
bar
: whether to show a color bar (defaultFalse
) -
nans
: whether to replace NaNs with 0 (defaultTrue
) -
clim
: limit for colormap (defaultNone
) -
grid
: grid dimensions to use (default is largest square grid) -
size
: size of figure (default7
) -
axis
: which axis to index images with (default0
)