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-generation-migration.md
+18-6
Original file line number
Diff line number
Diff line change
@@ -40,19 +40,31 @@ Plotly.py 6.1 introduces support for Kaleido v1, which [improves static image ge
40
40
41
41
While adding support for Kaleido v1, we are deprecating support for earlier versions of Kaleido and support for orca, another static image generation library. Support for earlier verisons of Kaleido and orca will be removed after September 2025, and we recommend updating to the latest Kaleido. This page documents how to migrate to Kaleido v1 and outlines any changes in functionality.
42
42
43
-
## Installing Kaleido
44
43
45
-
Install the latest kaleido with:
44
+
To migrate from either Orca or Kaleido v0, first install the latest Kaleido with:
46
45
47
46
```bash
48
47
pip install -U kaleido
49
48
```
50
49
51
-
## Updating Existing Code
50
+
## Engine Parameter
52
51
53
-
After September 2025, Kaleido v1 will be the sole supported static image generator for Plotly.py.
54
-
With this change, the `engine` parameter on Plotly figure methods and functions that generate static images will be removed. For example, `fig.to_image(format="png", engine="orca")` or `fig.to_image(format="png", engine="kaleido")` needs to be updted to `fig.to_image(format="png")`.
52
+
The `engine` parameter on static image export methods and functions is deprecated with this Plotly.py release and will be removed after September 2025. You'll need to update your code to remove references to this parameter. For example, `fig.to_image(format="png", engine="orca")` or `fig.to_image(format="png", engine="kaleido")` needs to be updated to `fig.to_image(format="png")`. This change applies to: `fig.to_image`, `fig.write_image`, `plotly.io.to_image`, and `plotly.io.write_image`.
55
53
56
-
This change applies to: `fig.to_image`, `fig.write_image`, `plotly.io.to_image`, and `plotly.io.write_image`.
54
+
## EPS Format
57
55
56
+
The `eps` format is no longer supported in Kaleido v1. If your existing code sets `format=eps`, you'll need to update it to use another format, for example `pdf`.
57
+
58
+
## Config Settings
59
+
60
+
Accessing Kaleido defaults and config settings via `plotly.io.kaleido.scope` is now deprecated and will be removed after September 2025. You'll need to update any code that uses `plotly.io.kaleido.scope` to instead use `plotly.io.defaults`. For example, to set the `default_format` to "jpeg":
61
+
62
+
~~~python
63
+
import plotly.io as pio
64
+
pio.defaults.default_format ="jpeg"
65
+
~~~
66
+
67
+
The `mapbox_access_token` config setting is not available on `plotly.io.defaults` because Mapbox maps are deprecated and will be removed in future version of Plotly.py. See [MapLibre Migration ](https://plotly.com/python/mapbox-to-maplibre/) for more details.
68
+
69
+
If you are migrating from Orca, the following config settings do not apply to Kaleido: `server_url`, `port`, `timeout`, and `use_xvfb`, but other settings, such as `default_format`, can be accessed via `plotly.io.defaults`.
0 commit comments