Skip to content

Interface: ImshowOptions ​

Options of imshow: px.imshow's arguments in camelCase.

Properties ​

PropertyModifierTypeDescription
animationFrame?readonlynumberDimension to animate over (negative counts from the end): one frame per index.
aspect?readonly"equal" | "auto"'equal' (default): square pixels (scaleanchor, constrain: 'domain'); 'auto': the image stretches to fill the plot.
binaryFormat?readonly"png"Format of binaryString images: only 'png'.
binaryString?readonlybooleanDraw the image from a PNG (image.source) rather than from z values: smaller figures and faster to draw, but hover shows only coordinates when the values were rescaled. Default true for RGB / RGBA images, false for single-channel ones.
colorContinuousMidpoint?readonlynumbercmid of the colorscale, for diverging scales.
colorContinuousScale?readonlyContinuousScaleColorscale of single-channel heatmaps. Default: the template's sequential colorscale.
colorscale?readonlyContinuousScaleAlias of colorContinuousScale.
contrastRescaling?readonly"minmax" | "infer"How zmin / zmax are found when not given: 'minmax' (the data's extent; default for single-channel images) or 'infer' (the range of the data's type; default for RGB / RGBA).
facetCol?readonlynumberDimension to facet over: one subplot per index, in columns.
facetColSpacing?readonlynumberSpace between facet columns, as a fraction of the plot width. Default 0.02.
facetColWrap?readonlynumberWrap the facet columns after this many.
facetRowSpacing?readonlynumberSpace between facet rows, as a fraction of the plot height. Default 0.07 (wrapped).
height?readonlynumberFigure height in px.
labels?readonlyImshowLabels-
origin?readonly"upper" | "lower"'upper' (default): row 0 at the top, as images are stored; 'lower': at the bottom.
rangeColor?readonlyreadonly [number, number][zmin, zmax].
template?readonlystring | Templatelayout.template (also where the default colorscale comes from).
textAuto?readonlystring | booleanShow each heatmap cell's value as text: true, or a d3 format ('.2f') — the heatmap's texttemplate.
title?readonlystringFigure title (layout.title.text).
width?readonlynumberFigure width in px.
x?readonlyArrayLike<unknown>Coordinates of the columns (as many as the image is wide). Heatmaps take any values; images need evenly spaced numbers (x0 and dx are taken from the first two).
y?readonlyArrayLike<unknown>Coordinates of the rows (as many as the image is high).
zmax?readonlynumber | readonly number[]Value (or per-channel values) shown as the highest color.
zmin?readonlynumber | readonly number[]Value (or per-channel values) shown as the lowest color: coloraxis.cmin of a heatmap, the image trace's zmin, or the low end of binaryString rescaling.

Released under the MIT License.