File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
packages/python/plotly/plotly/express Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ def imshow(
169
169
args = locals ()
170
170
apply_default_cascade (args )
171
171
img_is_xarray = False
172
- colorbar_title = ''
172
+ colorbar_title = ""
173
173
if xarray_imported :
174
174
if isinstance (img , xarray .DataArray ):
175
175
y_label , x_label = img .dims [0 ], img .dims [1 ]
@@ -186,14 +186,14 @@ def imshow(
186
186
colorbar_title = z_name
187
187
188
188
if labels is not None :
189
- if 'x' in labels :
190
- y_label = labels ['x' ]
191
- if 'y' in labels :
192
- y_label = labels ['y' ]
193
- if ' color' in labels :
194
- z_name = labels [' color' ]
195
- if ' colorbar' in labels :
196
- colorbar_title = labels [' colorbar' ]
189
+ if "x" in labels :
190
+ y_label = labels ["x" ]
191
+ if "y" in labels :
192
+ y_label = labels ["y" ]
193
+ if " color" in labels :
194
+ z_name = labels [" color" ]
195
+ if " colorbar" in labels :
196
+ colorbar_title = labels [" colorbar" ]
197
197
198
198
if not img_is_xarray :
199
199
if aspect is None :
@@ -226,7 +226,7 @@ def imshow(
226
226
cmid = color_continuous_midpoint ,
227
227
cmin = range_color [0 ],
228
228
cmax = range_color [1 ],
229
- colorbar = dict (title = colorbar_title )
229
+ colorbar = dict (title = colorbar_title ),
230
230
)
231
231
232
232
# For 2D+RGB data, use Image trace
You can’t perform that action at this time.
0 commit comments