From 415f98026e0fed3f4f03d0cb640e5b902086eaa3 Mon Sep 17 00:00:00 2001 From: Emmanuelle Gouillart Date: Tue, 3 Dec 2019 15:04:58 -0500 Subject: [PATCH] added imshow to px tutorial --- doc/python/plotly-express.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/python/plotly-express.md b/doc/python/plotly-express.md index 776d881be8f..ea7ffdd5508 100644 --- a/doc/python/plotly-express.md +++ b/doc/python/plotly-express.md @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.6.8 + version: 3.7.3 plotly: description: Plotly Express is a terse, consistent, high-level API for rapid data exploration and figure generation. @@ -262,6 +262,18 @@ fig = px.line_ternary(election, a="Joly", b="Coderre", c="Bergeron", color="winn fig.show() ``` +### Images + +```python +import plotly.express as px +import numpy as np +img_rgb = np.array([[[255, 0, 0], [0, 255, 0], [0, 0, 255]], + [[0, 255, 0], [0, 0, 255], [255, 0, 0]] + ], dtype=np.uint8) +fig = px.imshow(img_rgb) +fig.show() +``` + #### 3D Coordinates ```python