File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
packages/python/plotly/plotly/express Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,8 @@ import plotly.express as px
119
119
import xarray as xr
120
120
# Load xarray from dataset included in the xarray tutorial
121
121
# We remove 273.5 to display Celsius degrees instead of Kelvin degrees
122
- airtemps = xr.tutorial.open_dataset(' air_temperature' ).air.isel (lon = 20 ) - 273.5
123
- airtemps.attrs[' long_name' ] = ' Temperature' # used for hover
122
+ airtemps = xr.tutorial.open_dataset(' air_temperature' ).air.sel (lon = 250.0 )
123
+ # airtemps.attrs['long_name'] = 'Temperature' # used for hover
124
124
fig = px.imshow(airtemps.T, color_continuous_scale = ' RdBu_r' , origin = ' lower' )
125
125
fig.show()
126
126
```
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ def imshow(
68
68
zmin = None ,
69
69
zmax = None ,
70
70
origin = None ,
71
+ labels = None ,
71
72
color_continuous_scale = None ,
72
73
color_continuous_midpoint = None ,
73
74
range_color = None ,
@@ -173,6 +174,7 @@ def imshow(
173
174
if aspect is None :
174
175
aspect = "auto"
175
176
z_name = img .attrs ["long_name" ] if "long_name" in img .attrs else "z"
177
+ #TODO if ...
176
178
177
179
if not img_is_xarray :
178
180
if aspect is None :
You can’t perform that action at this time.
0 commit comments