@@ -46,8 +46,7 @@ def _infer_zmax_from_type(img):
46
46
47
47
48
48
def 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 ):
51
50
"""
52
51
Display an image, i.e. data on a 2D regular raster.
53
52
@@ -79,17 +78,20 @@ def imshow(
79
78
showticks : bool, default True
80
79
if False, no tick labels are shown for pixel indices.
81
80
82
- ** kwargs : additional arguments to be passed to the Heatmap (grayscale) or Image (RGB) trace.
83
-
84
81
Returns
85
82
-------
86
83
fig : graph_objects.Figure containing the displayed image
87
84
88
85
See also
89
86
--------
90
87
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`.
93
95
"""
94
96
img = np .asanyarray (img )
95
97
# Cast bools to uint8 (also one byte)
@@ -100,7 +102,7 @@ def imshow(
100
102
if img .ndim == 2 :
101
103
if colorscale is None :
102
104
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 )
104
106
autorange = True if origin == "lower" else "reversed"
105
107
layout = dict (
106
108
xaxis = dict (scaleanchor = "y" , constrain = "domain" ),
@@ -111,7 +113,7 @@ def imshow(
111
113
if zmax is None and img .dtype is not np .uint8 :
112
114
zmax = _infer_zmax_from_type (img )
113
115
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 )
115
117
layout = {}
116
118
if origin == "lower" :
117
119
layout ["yaxis" ] = dict (autorange = True )
0 commit comments