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/static-image-export.md
+10-12Lines changed: 10 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ jupyter:
6
6
extension: .md
7
7
format_name: markdown
8
8
format_version: '1.3'
9
-
jupytext_version: 1.16.4
9
+
jupytext_version: 1.17.0
10
10
kernelspec:
11
11
display_name: Python 3 (ipykernel)
12
12
language: python
@@ -20,7 +20,7 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.11.10
23
+
version: 3.13.2
24
24
plotly:
25
25
description: Plotly allows you to save static images of your plots. Save the image
26
26
to your local computer, or embed it inside your Jupyter notebooks as a static
@@ -58,7 +58,7 @@ It's also possible to generate static images using [Orca](https://github.com/plo
58
58
59
59
Kaleido uses Chrome for static image generation. Versions of Kaleido prior to v1 included Chrome. Kaleido v1 and later uses the Chrome that's available on the machine on which it's running. If you need to install Chrome for static image generation, Plotly provides a CLI.
60
60
61
-
Run `plotly_get_chrome` to install Chrome.
61
+
Run `plotly_get_chrome` to install Chrome.
62
62
63
63
You can also install Chrome from within Python using `plotly.io.install_chrome()`
64
64
@@ -71,14 +71,14 @@ pio.install_chrome()
71
71
72
72
## Write Image to a File
73
73
74
-
Plotly figures have a `write_image` method to write a figure to a file. `write_image` supports PNG, JPEG, WebP, SVG, and PDF.
74
+
Plotly figures have a `write_image` method to write a figure to a file. `write_image` supports PNG, JPEG, WebP, SVG, and PDF.
75
75
76
-
To export a figure using `write_image`, call `write_image` on the figure, and pass as an argument the filename where you want to save the figure. The file format is inferred from the extension:
76
+
To export a figure using `write_image`, call `write_image` on the figure, and pass as an argument the filename where you want to save the figure. The file format is inferred from the extension:
### Display Bytes as Image Using `IPython.display.Image`
160
-
A bytes object representing a PNG image can be displayed directly in the notebook using the `IPython.display.Image` class. This also works in the [Qt Console for Jupyter](https://qtconsole.readthedocs.io/en/stable/)!
158
+
Here's the bytes object displayed using `IPython.display.Image`:
As well as configuring height, width, and other settings by passing arguments when calling `write_image` and `to_image`, you can also set a single default to be used throughout the duration of the program.
215
+
As well as configuring height, width, and other settings by passing arguments when calling `write_image` and `to_image`, you can also set a single default to be used throughout the duration of the program.
218
216
219
217
### Available Settings
220
218
221
-
The following settings are availble.
219
+
The following settings are availble.
222
220
223
221
`default_width`: The default pixel width to use on image export.
0 commit comments