File tree 1 file changed +2
-2
lines changed 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -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 skimage import data
177
177
img = data.chelsea()
178
178
fig = make_subplots(1 , 2 )
179
- # We use go.Image because at the moment px functions are not compatible with subplots
179
+ # We use go.Image because subplots require traces, whereas px functions return a figure
180
180
fig.add_trace(go.Image(z = img), 1 , 1 )
181
181
for channel, color in enumerate ([' red' , ' green' , ' blue' ]):
182
182
fig.add_trace(go.Histogram(x = img[... , channel].ravel(), opacity = 0.5 ,
You can’t perform that action at this time.
0 commit comments