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
119119import xarray as xr
120120# Load xarray from dataset included in the xarray tutorial
121121# 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
124124fig = px.imshow(airtemps.T, color_continuous_scale = ' RdBu_r' , origin = ' lower' )
125125fig.show()
126126```
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ def imshow(
6868 zmin = None ,
6969 zmax = None ,
7070 origin = None ,
71+ labels = None ,
7172 color_continuous_scale = None ,
7273 color_continuous_midpoint = None ,
7374 range_color = None ,
@@ -173,6 +174,7 @@ def imshow(
173174 if aspect is None :
174175 aspect = "auto"
175176 z_name = img .attrs ["long_name" ] if "long_name" in img .attrs else "z"
177+ #TODO if ...
176178
177179 if not img_is_xarray :
178180 if aspect is None :
You can’t perform that action at this time.
0 commit comments