Skip to content

Commit 70984fb

Browse files
committed
Update _kaleido.py
1 parent a2697d5 commit 70984fb

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

plotly/io/_kaleido.py

+31-11
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
PLOTLY_GET_CHROME_ERROR_MSG = """
1616
17-
Kaleido requires Google Chrome to be installed.
17+
Kaleido requires Google Chrome to be installed.
1818
1919
Either download and install Chrome yourself following Google's instructions for your operating system,
2020
or install it from your terminal by running:
@@ -549,47 +549,67 @@ def write_images(
549549
Parameters
550550
----------
551551
fig:
552-
Iterable of figure objects or dicts representing a figure
552+
List of figure objects or dicts representing a figure.
553+
Also accepts a single figure or dict representing a figure.
553554
554-
file: str or writeable
555-
Iterables of strings or pathlib.Path objects representing local file paths to write to.
555+
file: str, pathlib.Path, or list of (str or pathlib.Path)
556+
List of str or pathlib.Path objects representing local file paths to write to.
557+
Can also be a single str or pathlib.Path object if fig argument is
558+
a single figure or dict representing a figure.
556559
557-
format: str or None
558-
The desired image format. One of
560+
format: str, None, or list of (str or None)
561+
The image format to use for exported images.
562+
Supported formats are:
559563
- 'png'
560564
- 'jpg' or 'jpeg'
561565
- 'webp'
562566
- 'svg'
563567
- 'pdf'
564568
565-
If not specified, this will default to `plotly.io.defaults.default_format`.
569+
Use a list to specify formats for each figure or dict in the list
570+
provided to the `fig` argument.
571+
Specify format as a `str` to apply the same format to all exported images.
572+
If not specified, will default to `plotly.io.defaults.default_format`.
566573
567-
width: int or None
574+
width: int, None, or list of (int or None)
568575
The width of the exported image in layout pixels. If the `scale`
569576
property is 1.0, this will also be the width of the exported image
570577
in physical pixels.
571578
579+
Use a list to specify widths for each figure or dict in the list
580+
provided to the `fig` argument.
581+
Specify width as an `int` to apply the same width to all exported images.
572582
If not specified, will default to `plotly.io.defaults.default_width`.
573583
574-
height: int or None
584+
height: int, None, or list of (int or None)
575585
The height of the exported image in layout pixels. If the `scale`
576586
property is 1.0, this will also be the height of the exported image
577587
in physical pixels.
578588
589+
Use a list to specify heights for each figure or dict in the list
590+
provided to the `fig` argument.
591+
Specify height as an `int` to apply the same height to all exported images.
579592
If not specified, will default to `plotly.io.defaults.default_height`.
580593
581-
scale: int or float or None
594+
scale: int, float, None, or list of (int, float, or None)
582595
The scale factor to use when exporting the figure. A scale factor
583596
larger than 1.0 will increase the image resolution with respect
584597
to the figure's layout pixel dimensions. Whereas as scale factor of
585598
less than 1.0 will decrease the image resolution.
586599
600+
Use a list to specify scale for each figure or dict in the list
601+
provided to the `fig` argument.
602+
Specify scale as an `int` or `float` to apply the same scale to all exported images.
587603
If not specified, will default to `plotly.io.defaults.default_scale`.
588604
589-
validate: bool
605+
validate: bool or list of bool
590606
True if the figure should be validated before being converted to
591607
an image, False otherwise.
592608
609+
Use a list to specify validation setting for each figure in the list
610+
provided to the `fig` argument.
611+
Specify validate as a boolean to apply the same validation setting to all figures.
612+
593613
Returns
594614
-------
595615
None

0 commit comments

Comments
 (0)