@@ -46,8 +46,7 @@ def _infer_zmax_from_type(img):
4646
4747
4848def imshow (
49- img , zmin = None , zmax = None , origin = None , colorscale = None , showticks = True , ** kwargs
50- ):
49+ img , zmin = None , zmax = None , origin = None , colorscale = None , showticks = True ):
5150 """
5251 Display an image, i.e. data on a 2D regular raster.
5352
@@ -79,17 +78,20 @@ def imshow(
7978 showticks : bool, default True
8079 if False, no tick labels are shown for pixel indices.
8180
82- ** kwargs : additional arguments to be passed to the Heatmap (grayscale) or Image (RGB) trace.
83-
8481 Returns
8582 -------
8683 fig : graph_objects.Figure containing the displayed image
8784
8885 See also
8986 --------
9087
91- graph_objects.Image : image trace
92- graph_objects.Heatmap : heatmap trace
88+ plotly.graph_objects.Image : image trace
89+ plotly.graph_objects.Heatmap : heatmap trace
90+
91+ Notes
92+ -----
93+
94+ In order to update and customize the returned figure, use `go.Figure.update_traces` or `go.Figure.update_layout`.
9395 """
9496 img = np .asanyarray (img )
9597 # Cast bools to uint8 (also one byte)
@@ -100,7 +102,7 @@ def imshow(
100102 if img .ndim == 2 :
101103 if colorscale is None :
102104 colorscale = "gray"
103- trace = go .Heatmap (z = img , zmin = zmin , zmax = zmax , colorscale = colorscale , ** kwargs )
105+ trace = go .Heatmap (z = img , zmin = zmin , zmax = zmax , colorscale = colorscale )
104106 autorange = True if origin == "lower" else "reversed"
105107 layout = dict (
106108 xaxis = dict (scaleanchor = "y" , constrain = "domain" ),
@@ -111,7 +113,7 @@ def imshow(
111113 if zmax is None and img .dtype is not np .uint8 :
112114 zmax = _infer_zmax_from_type (img )
113115 zmin , zmax = _vectorize_zvalue (zmin ), _vectorize_zvalue (zmax )
114- trace = go .Image (z = img , zmin = zmin , zmax = zmax , ** kwargs )
116+ trace = go .Image (z = img , zmin = zmin , zmax = zmax )
115117 layout = {}
116118 if origin == "lower" :
117119 layout ["yaxis" ] = dict (autorange = True )
0 commit comments