Skip to content

Commit 8cdc6af

Browse files
committed
updated doc
1 parent 36b9f98 commit 8cdc6af

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

doc/python/imshow.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.2'
9-
jupytext_version: 1.3.0
9+
jupytext_version: 1.7.1
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -401,7 +401,7 @@ fig.show()
401401

402402
### Exploring 3-D images and timeseries with `facet_col`
403403

404-
*Introduced in plotly 4.11*
404+
*Introduced in plotly 4.13*
405405

406406
For three-dimensional image datasets, obtained for example by MRI or CT in medical imaging, one can explore the dataset by representing its different planes as facets. The `facet_col` argument specifies along which axis the image is sliced through to make the facets. With `facet_col_wrap`, one can set the maximum number of columns. For image datasets passed as xarrays, it is also possible to specify the axis by its name (label), thus passing a string to `facet_col`.
407407

@@ -416,27 +416,13 @@ from skimage.data import image_fetcher
416416
path = image_fetcher.fetch('data/cells.tif')
417417
data = io.imread(path)
418418
img = data[20:45:2]
419-
fig = px.imshow(img, facet_col=0, binary_string=True, facet_col_wrap=5, height=700)
420-
fig.show()
421-
```
422-
423-
```python
424-
import plotly.express as px
425-
from skimage import io
426-
from skimage.data import image_fetcher
427-
path = image_fetcher.fetch('data/cells.tif')
428-
data = io.imread(path)
429-
img = data[25:40]
430419
fig = px.imshow(img, facet_col=0, binary_string=True, facet_col_wrap=5)
431-
# To have square facets one needs to unmatch axes
432-
fig.update_xaxes(matches=None)
433-
fig.update_yaxes(matches=None)
434420
fig.show()
435421
```
436422

437423
### Exploring 3-D images and timeseries with `animation_frame`
438424

439-
*Introduced in plotly 4.11*
425+
*Introduced in plotly 4.13*
440426

441427
For three-dimensional image datasets, obtained for example by MRI or CT in medical imaging, one can explore the dataset by sliding through its different planes in an animation. The `animation_frame` argument of `px.imshow` sets the axis along which the 3-D image is sliced in the animation.
442428

0 commit comments

Comments
 (0)