@@ -129,7 +129,7 @@ img = data.astronaut()
129
129
# Increase contrast by clipping the data range between 50 and 200
130
130
fig= px.imshow(img,zmin = 50 ,zmax = 200 )
131
131
# We customize the hovertemplate to show both the data and the color values
132
- # See https://plot.ly/python/v3/ hover-text-and-formatting/#hovertemplate
132
+ # See https://plot.ly/python/hover-text-and-formatting/#customize-tooltip-text-with-a- hovertemplate
133
133
fig.update_traces(hovertemplate = " x: %{x} <br> y: %{y} <br> z: %{z} <br> color: %{color} " )
134
134
fig.show()
135
135
```
@@ -176,7 +176,7 @@ from plotly.subplots import make_subplots
176
176
from skimageimport data
177
177
img= data.chelsea()
178
178
fig= make_subplots(1 ,2 )
179
- # We use go.Image becauseat the moment px functionsare not compatible with subplots
179
+ # We use go.Image becausesubplots require traces, whereas px functionsreturn a figure
180
180
fig.add_trace(go.Image(z = img),1 ,1 )
181
181
for channel, colorin enumerate ([' red' ,' green' ,' blue' ]):
182
182
fig.add_trace(go.Histogram(x = img[... , channel].ravel(),opacity = 0.5 ,