Skip to content

Commit e667b1a

Browse files
authored
mention PIL in Layout image tutorial (#2004)
1 parent 39ac9f3 commit e667b1a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/python/images.md

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ jupyter:
3737

3838
In this page we explain how to add static, non-interactive images as background, logo or annotation images to a figure. For exploring image data in interactive charts, see the [tutorial on displaying image data](/python/imshow).
3939

40+
A background image can be added to the layout of a figure with
41+
`fig.add_layout_image` or by setting the `images` parameter of `go.Layout`. The
42+
`source` attribute of a `go.layout.Image` can be the URL of an image, or a PIL
43+
Image object (`from PIL import Image; img = Image.open('filename.png')`).
44+
4045
```python
4146
import plotly.graph_objects as go
4247

0 commit comments

Comments
 (0)