Skip to content

Commit 5a05be1

Browse files
authored
added imshow to px tutorial (#1955)
1 parent 767d6b1 commit 5a05be1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

doc/python/plotly-express.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.6.8
23+
version: 3.7.3
2424
plotly:
2525
description: Plotly Express is a terse, consistent, high-level API for rapid data
2626
exploration and figure generation.
@@ -262,6 +262,18 @@ fig = px.line_ternary(election, a="Joly", b="Coderre", c="Bergeron", color="winn
262262
fig.show()
263263
```
264264

265+
### Images
266+
267+
```python
268+
import plotly.express as px
269+
import numpy as np
270+
img_rgb = np.array([[[255, 0, 0], [0, 255, 0], [0, 0, 255]],
271+
[[0, 255, 0], [0, 0, 255], [255, 0, 0]]
272+
], dtype=np.uint8)
273+
fig = px.imshow(img_rgb)
274+
fig.show()
275+
```
276+
265277
#### 3D Coordinates
266278

267279
```python

0 commit comments

Comments
 (0)