You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python/imshow.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -400,11 +400,11 @@ for compression_level in range(0, 9):
400
400
fig.show()
401
401
```
402
402
403
-
### Exploring 3-D images, timeseries and sequences of images with `facet_col`
403
+
### Exploring 3-D and 4-D images with `facet_col` and `facet_row`
404
404
405
-
*Introduced in plotly 4.14*
405
+
*`facet_col` introduced in plotly 4.14, `facet_row` introduced in plotly 6.7.0*
406
406
407
-
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`.
407
+
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 column facets, while `facet_row` specifies the axis for row facets. Using both together creates a grid of subplots for 4-D datasets. With `facet_col_wrap`, one can set the maximum number of columns (ignored when `facet_row` is set). 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` or `facet_row`.
408
408
409
409
It is recommended to use `binary_string=True` for facetted plots of images in order to keep a small figure size and a short rendering time.
410
410
@@ -436,6 +436,18 @@ for i, sigma in enumerate(sigmas):
436
436
fig.show()
437
437
```
438
438
439
+
The `facet_row` argument slices the image along a different axis to arrange facets vertically. When both `facet_row` and `facet_col` are used together, a grid of subplots is created from a 4-D dataset.
440
+
441
+
```python
442
+
import plotly.express as px
443
+
from skimage import io
444
+
data = io.imread("https://github.com/scikit-image/skimage-tutorials/raw/main/images/cells.tif")
See [function reference for `px.(imshow)`](https://plotly.com/python-api-reference/generated/plotly.express.imshow) or https://plotly.com/python/reference/image/ for more information and chart attribute options!
0 commit comments