Skip to content

Commit 2cbd63c

Browse files
committed
Update migration guide for Kaleido
1 parent 3281d99 commit 2cbd63c

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

doc/python/static-image-generation-migration.md

+18-6
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,31 @@ Plotly.py 6.1 introduces support for Kaleido v1, which [improves static image ge
4040

4141
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.
4242

43-
## Installing Kaleido
4443

45-
Install the latest kaleido with:
44+
To migrate from either Orca or Kaleido v0, first install the latest Kaleido with:
4645

4746
```bash
4847
pip install -U kaleido
4948
```
5049

51-
## Updating Existing Code
50+
## Engine Parameter
5251

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`.
5553

56-
This change applies to: `fig.to_image`, `fig.write_image`, `plotly.io.to_image`, and `plotly.io.write_image`.
54+
## EPS Format
5755

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`.
5870
<!-- #endregion -->

0 commit comments

Comments
 (0)