Skip to content

Commit a3844c4

Browse files
authored
removing colorbar imshow example (#1975)
1 parent 795009a commit a3844c4

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

doc/python/imshow.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: '1.1'
9-
jupytext_version: 1.1.1
8+
format_version: '1.2'
9+
jupytext_version: 1.3.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -97,6 +97,19 @@ fig = px.imshow(img, color_continuous_scale='gray')
9797
fig.show()
9898
```
9999

100+
### Hiding the colorbar when displaying a single-channel image
101+
102+
See [the tutorial on coloraxis](/python/colorscales/#share-color-axis) for more details on coloraxis.
103+
104+
```python
105+
import plotly.express as px
106+
from skimage import data
107+
img = data.camera()
108+
fig = px.imshow(img, color_continuous_scale='gray')
109+
fig.update_layout(coloraxis_showscale=False)
110+
fig.show()
111+
```
112+
100113
### Display multichannel image data with go.Image
101114

102115
It is also possible to use the `go.Image` trace from the low-level `graph_objects` API in order to display image data. Note that `go.Image` only accepts multichannel images. For single images, use [`go.Heatmap`](/python/heatmaps).

0 commit comments

Comments
 (0)