Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert "update docstrings" commit which removed deprecation language
This reverts commit 467c135.
  • Loading branch information
emilykl committed Jun 19, 2025
commit f512eb81feed3dc801016f3e645ac2cd838d6a1f
40 changes: 20 additions & 20 deletions plotly/basedatatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3724,29 +3724,29 @@ def to_image(self, *args, **kwargs):
- 'webp'
- 'svg'
- 'pdf'
- 'eps' (Kaleido v0.* only) (Requires the poppler library to be installed)
- 'eps' (deprecated) (Requires the poppler library to be installed)

If not specified, will default to:
- `plotly.io.defaults.default_format` or `plotly.io.kaleido.scope.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca"
- `plotly.io.defaults.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca" (deprecated)

width: int or None
The width of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the width of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_width` or `plotly.io.kaleido.scope.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca"
- `plotly.io.defaults.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca" (deprecated)

height: int or None
The height of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the height of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_height` or `plotly.io.kaleido.scope.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca"
- `plotly.io.defaults.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca" (deprecated)

scale: int or float or None
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -3755,14 +3755,14 @@ def to_image(self, *args, **kwargs):
less than 1.0 will decrease the image resolution.

If not specified, will default to:
- `plotly.io.defaults.default_scale` or `plotly.io.kaleido.scope.default_scale` if engine is "kaliedo"
- `plotly.io.orca.config.default_scale` if engine is "orca"
- `plotly.io.defaults.default_scale` if engine is "kaliedo"
- `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated)

validate: bool
True if the figure should be validated before being converted to
an image, False otherwise.

engine: str
engine (deprecated): str
Image export engine to use. This parameter is deprecated and Orca engine support will be
dropped in the next major Plotly version. Until then, the following values are supported:
- "kaleido": Use Kaleido for image export
Expand Down Expand Up @@ -3818,31 +3818,31 @@ def write_image(self, *args, **kwargs):
- 'webp'
- 'svg'
- 'pdf'
- 'eps' (Kaleido v0.* only) (Requires the poppler library to be installed)
- 'eps' (deprecated) (Requires the poppler library to be installed)

If not specified and `file` is a string then this will default to the
file extension. If not specified and `file` is not a string then this
will default to:
- `plotly.io.defaults.default_format` or `plotly.io.kaleido.scope.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca"
- `plotly.io.defaults.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca" (deprecated)

width: int or None
The width of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the width of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_width` or `plotly.io.kaleido.scope.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca"
- `plotly.io.defaults.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca" (deprecated)

height: int or None
The height of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the height of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_height` or `plotly.io.kaleido.scope.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca"
- `plotly.io.defaults.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca" (deprecated)

scale: int or float or None
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -3851,14 +3851,14 @@ def write_image(self, *args, **kwargs):
less than 1.0 will decrease the image resolution.

If not specified, will default to:
- `plotly.io.defaults.default_scale` or `plotly.io.kaleido.scope.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca"
- `plotly.io.defaults.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated)

validate: bool
True if the figure should be validated before being converted to
an image, False otherwise.

engine: str
engine (deprecated): str
Image export engine to use. This parameter is deprecated and Orca engine support will be
dropped in the next major Plotly version. Until then, the following values are supported:
- "kaleido": Use Kaleido for image export
Expand Down
52 changes: 24 additions & 28 deletions plotly/io/_kaleido.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,29 +247,29 @@ def to_image(
- 'webp'
- 'svg'
- 'pdf'
- 'eps' (Kaleido v0.* only) (Requires the poppler library to be installed and on the PATH)
- 'eps' (deprecated) (Requires the poppler library to be installed and on the PATH)

If not specified, will default to:
- `plotly.io.defaults.default_format` or `plotly.io.kaleido.scope.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca"
- `plotly.io.defaults.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca" (deprecated)

width: int or None
The width of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the width of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_width` or `plotly.io.kaleido.scope.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca"
- `plotly.io.defaults.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca" (deprecated)

height: int or None
The height of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the height of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_height` or `plotly.io.kaleido.scope.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca"
- `plotly.io.defaults.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca" (deprecated)

scale: int or float or None
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -278,14 +278,14 @@ def to_image(
less than 1.0 will decrease the image resolution.

If not specified, will default to:
- `plotly.io.defaults.default_scale` or `plotly.io.kaleido.scope.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca"
- `plotly.io.defaults.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated)

validate: bool
True if the figure should be validated before being converted to
an image, False otherwise.

engine: str
engine (deprecated): str
Image export engine to use. This parameter is deprecated and Orca engine support will be
dropped in the next major Plotly version. Until then, the following values are supported:
- "kaleido": Use Kaleido for image export
Expand Down Expand Up @@ -433,31 +433,31 @@ def write_image(
- 'webp'
- 'svg'
- 'pdf'
- 'eps' (Kaleido v0.* only) (Requires the poppler library to be installed and on the PATH)
- 'eps' (deprecated) (Requires the poppler library to be installed and on the PATH)

If not specified and `file` is a string then this will default to the
file extension. If not specified and `file` is not a string then this
will default to:
- `plotly.io.defaults.default_format` or `plotly.io.kaleido.scope.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca"
- `plotly.io.defaults.default_format` if engine is "kaleido"
- `plotly.io.orca.config.default_format` if engine is "orca" (deprecated)

width: int or None
The width of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the width of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_width` or `plotly.io.kaleido.scope.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca"
- `plotly.io.defaults.default_width` if engine is "kaleido"
- `plotly.io.orca.config.default_width` if engine is "orca" (deprecated)

height: int or None
The height of the exported image in layout pixels. If the `scale`
property is 1.0, this will also be the height of the exported image
in physical pixels.

If not specified, will default to:
- `plotly.io.defaults.default_height` or `plotly.io.kaleido.scope.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca"
- `plotly.io.defaults.default_height` if engine is "kaleido"
- `plotly.io.orca.config.default_height` if engine is "orca" (deprecated)

scale: int or float or None
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -466,14 +466,14 @@ def write_image(
less than 1.0 will decrease the image resolution.

If not specified, will default to:
- `plotly.io.defaults.default_scale` or `plotly.io.kaleido.scope.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca"
- `plotly.io.defaults.default_scale` if engine is "kaleido"
- `plotly.io.orca.config.default_scale` if engine is "orca" (deprecated)

validate: bool
True if the figure should be validated before being converted to
an image, False otherwise.

engine: str
engine (deprecated): str
Image export engine to use. This parameter is deprecated and Orca engine support will be
dropped in the next major Plotly version. Until then, the following values are supported:
- "kaleido": Use Kaleido for image export
Expand Down Expand Up @@ -582,8 +582,7 @@ def write_images(
provided to the `fig` argument.
Specify format as a `str` to apply the same format to all exported images.
If not specified, and the corresponding `file` argument has a file extension, then `format` will default to the
file extension. Otherwise, will default to `plotly.io.defaults.default_format`
or `plotly.io.kaleido.scope.default_format`.
file extension. Otherwise, will default to `plotly.io.defaults.default_format`.

width: int, None, or list of (int or None)
The width of the exported image in layout pixels. If the `scale`
Expand All @@ -593,8 +592,7 @@ def write_images(
Use a list to specify widths for each figure or dict in the list
provided to the `fig` argument.
Specify width as an `int` to apply the same width to all exported images.
If not specified, will default to `plotly.io.defaults.default_width`
or `plotly.io.kaleido.scope.default_width`.
If not specified, will default to `plotly.io.defaults.default_width`.

height: int, None, or list of (int or None)
The height of the exported image in layout pixels. If the `scale`
Expand All @@ -604,8 +602,7 @@ def write_images(
Use a list to specify heights for each figure or dict in the list
provided to the `fig` argument.
Specify height as an `int` to apply the same height to all exported images.
If not specified, will default to `plotly.io.defaults.default_height`
or `plotly.io.kaleido.scope.default_height`.
If not specified, will default to `plotly.io.defaults.default_height`.

scale: int, float, None, or list of (int, float, or None)
The scale factor to use when exporting the figure. A scale factor
Expand All @@ -616,8 +613,7 @@ def write_images(
Use a list to specify scale for each figure or dict in the list
provided to the `fig` argument.
Specify scale as an `int` or `float` to apply the same scale to all exported images.
If not specified, will default to `plotly.io.defaults.default_scale`
or `plotly.io.kaleido.scope.default_scale`.
If not specified, will default to `plotly.io.defaults.default_scale`.

validate: bool or list of bool
True if the figure should be validated before being converted to
Expand Down