Display an image, i.e. data on a 2D regular raster. Parameters ---------- img: array-like image, or xarray The image data. Supported array shapes are - (M, N): an image with scalar data. The data is visualized using a colormap. - (M, N, 3): an im
(
img,
zmin=None,
zmax=None,
origin=None,
labels={},
x=None,
y=None,
animation_frame=None,
facet_col=None,
facet_row=None,
facet_col_wrap=None,
facet_col_spacing=None,
facet_row_spacing=None,
color_continuous_scale=None,
color_continuous_midpoint=None,
range_color=None,
title=None,
template=None,
width=None,
height=None,
aspect=None,
contrast_rescaling=None,
binary_string=None,
binary_backend="auto",
binary_compression_level=4,
binary_format="png",
text_auto=False,
)
| 54 | |
| 55 | |
| 56 | def imshow( |
| 57 | img, |
| 58 | zmin=None, |
| 59 | zmax=None, |
| 60 | origin=None, |
| 61 | labels={}, |
| 62 | x=None, |
| 63 | y=None, |
| 64 | animation_frame=None, |
| 65 | facet_col=None, |
| 66 | facet_row=None, |
| 67 | facet_col_wrap=None, |
| 68 | facet_col_spacing=None, |
| 69 | facet_row_spacing=None, |
| 70 | color_continuous_scale=None, |
| 71 | color_continuous_midpoint=None, |
| 72 | range_color=None, |
| 73 | title=None, |
| 74 | template=None, |
| 75 | width=None, |
| 76 | height=None, |
| 77 | aspect=None, |
| 78 | contrast_rescaling=None, |
| 79 | binary_string=None, |
| 80 | binary_backend="auto", |
| 81 | binary_compression_level=4, |
| 82 | binary_format="png", |
| 83 | text_auto=False, |
| 84 | ) -> go.Figure: |
| 85 | """ |
| 86 | Display an image, i.e. data on a 2D regular raster. |
| 87 | |
| 88 | Parameters |
| 89 | ---------- |
| 90 | |
| 91 | img: array-like image, or xarray |
| 92 | The image data. Supported array shapes are |
| 93 | |
| 94 | - (M, N): an image with scalar data. The data is visualized |
| 95 | using a colormap. |
| 96 | - (M, N, 3): an image with RGB values. |
| 97 | - (M, N, 4): an image with RGBA values, i.e. including transparency. |
| 98 | |
| 99 | zmin, zmax : scalar or iterable, optional |
| 100 | zmin and zmax define the scalar range that the colormap covers. By default, |
| 101 | zmin and zmax correspond to the min and max values of the datatype for integer |
| 102 | datatypes (ie [0-255] for uint8 images, [0, 65535] for uint16 images, etc.). For |
| 103 | a multichannel image of floats, the max of the image is computed and zmax is the |
| 104 | smallest power of 256 (1, 255, 65535) greater than this max value, |
| 105 | with a 5% tolerance. For a single-channel image, the max of the image is used. |
| 106 | Overridden by range_color. |
| 107 | |
| 108 | origin : str, 'upper' or 'lower' (default 'upper') |
| 109 | position of the [0, 0] pixel of the image array, in the upper left or lower left |
| 110 | corner. The convention 'upper' is typically used for matrices and images. |
| 111 | |
| 112 | labels : dict with str keys and str values (default `{}`) |
| 113 | Sets names used in the figure for axis titles (keys ``x`` and ``y``), |
no test coverage detected