Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eef950e

Browse files
committed
Fixed types for parameters 'annotation', 'annotation_position', and 'engine'
1 parent f35c9fa commit eef950e

File tree

4 files changed

+46
-46
lines changed

4 files changed

+46
-46
lines changed

‎plotly/basedatatypes.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -348,23 +348,23 @@ def _axis_spanning_shapes_docstr(shape_type):
348348
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
349349
the specified column(s). If both row and col are None, addresses the
350350
first subplot if subplots exist, or the only plot. By default is "all".
351-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
352-
it is interpreted as describing an annotation. The annotation is
351+
annotation : dict or plotly.graph_objs.layout.Annotation
352+
If dict(), it is interpreted as describing an annotation. The annotation is
353353
placed relative to the shape based on annotation_position (see
354354
below) unless its x or y value has been specified for the annotation
355355
passed here. xref and yref are always the same as for the added
356356
shape and cannot be overridden."""
357357
if shape_type in ["hline", "vline"]:
358358
docstr += """
359-
annotation_position : a string containing optionally ["top", "bottom"]
360-
and ["left", "right"] specifying where the text should be anchored
359+
annotation_position : a string containing optionally ["top", "bottom"] and ["left", "right"]
360+
Specifies where the text should be anchored
361361
to on the line. Example positions are "bottom left", "right top",
362362
"right", "bottom". If an annotation is added but annotation_position is
363363
not specified, this defaults to "top right"."""
364364
elif shape_type in ["hrect", "vrect"]:
365365
docstr += """
366-
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"]
367-
and ["left", "right"] specifying where the text should be anchored
366+
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"] and ["left", "right"]
367+
Specifies where the text should be anchored
368368
to on the rectangle. Example positions are "outside top left", "inside
369369
bottom", "right", "inside left", "inside" ("outside" is not supported). If
370370
an annotation is added but annotation_position is not specified this
@@ -940,7 +940,7 @@ def pop(self, key, *args):
940940
----------
941941
key : str
942942
Property name
943-
dflt:
943+
dflt:
944944
The default value to return if key was not found in figure
945945
946946
Returns
@@ -3761,7 +3761,7 @@ def to_image(self, *args, **kwargs):
37613761
True if the figure should be validated before being converted to
37623762
an image, False otherwise.
37633763
3764-
engine (deprecated) : str
3764+
engine : str
37653765
Image export engine to use. This parameter is deprecated and Orca engine support will be
37663766
dropped in the next major Plotly version. Until then, the following values are supported:\n
37673767
- "kaleido": Use Kaleido for image export
@@ -3857,7 +3857,7 @@ def write_image(self, *args, **kwargs):
38573857
True if the figure should be validated before being converted to
38583858
an image, False otherwise.
38593859
3860-
engine (deprecated) : str
3860+
engine : str
38613861
Image export engine to use. This parameter is deprecated and Orca engine support will be
38623862
dropped in the next major Plotly version. Until then, the following values are supported:\n
38633863
- "kaleido": Use Kaleido for image export
@@ -5206,7 +5206,7 @@ def pop(self, key, *args):
52065206
----------
52075207
key : str
52085208
Property name
5209-
dflt
5209+
dflt :
52105210
The default value to return if key was not found in object
52115211
52125212
Returns

‎plotly/graph_objects/_figure.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,14 @@ def add_vline(
456456
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
457457
the specified column(s). If both row and col are None, addresses the
458458
first subplot if subplots exist, or the only plot. By default is "all".
459-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
460-
it is interpreted as describing an annotation. The annotation is
459+
annotation : dict or plotly.graph_objs.layout.Annotation
460+
If dict(), it is interpreted as describing an annotation. The annotation is
461461
placed relative to the shape based on annotation_position (see
462462
below) unless its x or y value has been specified for the annotation
463463
passed here. xref and yref are always the same as for the added
464464
shape and cannot be overridden.
465-
annotation_position : a string containing optionally ["top", "bottom"]
466-
and ["left", "right"] specifying where the text should be anchored
465+
annotation_position : a string containing optionally ["top", "bottom"] and ["left", "right"]
466+
Specifies where the text should be anchored
467467
to on the line. Example positions are "bottom left", "right top",
468468
"right", "bottom". If an annotation is added but annotation_position is
469469
not specified, this defaults to "top right".
@@ -508,14 +508,14 @@ def add_hline(
508508
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
509509
the specified column(s). If both row and col are None, addresses the
510510
first subplot if subplots exist, or the only plot. By default is "all".
511-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
512-
it is interpreted as describing an annotation. The annotation is
511+
annotation : dict or plotly.graph_objs.layout.Annotation
512+
If dict(), it is interpreted as describing an annotation. The annotation is
513513
placed relative to the shape based on annotation_position (see
514514
below) unless its x or y value has been specified for the annotation
515515
passed here. xref and yref are always the same as for the added
516516
shape and cannot be overridden.
517-
annotation_position : a string containing optionally ["top", "bottom"]
518-
and ["left", "right"] specifying where the text should be anchored
517+
annotation_position : a string containing optionally ["top", "bottom"] and ["left", "right"]
518+
Specifies where the text should be anchored
519519
to on the line. Example positions are "bottom left", "right top",
520520
"right", "bottom". If an annotation is added but annotation_position is
521521
not specified, this defaults to "top right".
@@ -563,14 +563,14 @@ def add_vrect(
563563
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
564564
the specified column(s). If both row and col are None, addresses the
565565
first subplot if subplots exist, or the only plot. By default is "all".
566-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
567-
it is interpreted as describing an annotation. The annotation is
566+
annotation : dict or plotly.graph_objs.layout.Annotation
567+
If dict(), it is interpreted as describing an annotation. The annotation is
568568
placed relative to the shape based on annotation_position (see
569569
below) unless its x or y value has been specified for the annotation
570570
passed here. xref and yref are always the same as for the added
571571
shape and cannot be overridden.
572-
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"]
573-
and ["left", "right"] specifying where the text should be anchored
572+
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"] and ["left", "right"]
573+
Specifies where the text should be anchored
574574
to on the rectangle. Example positions are "outside top left", "inside
575575
bottom", "right", "inside left", "inside" ("outside" is not supported). If
576576
an annotation is added but annotation_position is not specified this
@@ -619,14 +619,14 @@ def add_hrect(
619619
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
620620
the specified column(s). If both row and col are None, addresses the
621621
first subplot if subplots exist, or the only plot. By default is "all".
622-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
623-
it is interpreted as describing an annotation. The annotation is
622+
annotation : dict or plotly.graph_objs.layout.Annotation
623+
If dict(), it is interpreted as describing an annotation. The annotation is
624624
placed relative to the shape based on annotation_position (see
625625
below) unless its x or y value has been specified for the annotation
626626
passed here. xref and yref are always the same as for the added
627627
shape and cannot be overridden.
628-
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"]
629-
and ["left", "right"] specifying where the text should be anchored
628+
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"] and ["left", "right"]
629+
Specifies where the text should be anchored
630630
to on the rectangle. Example positions are "outside top left", "inside
631631
bottom", "right", "inside left", "inside" ("outside" is not supported). If
632632
an annotation is added but annotation_position is not specified this

‎plotly/graph_objects/_figurewidget.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,14 @@ def add_vline(
456456
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
457457
the specified column(s). If both row and col are None, addresses the
458458
first subplot if subplots exist, or the only plot. By default is "all".
459-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
460-
it is interpreted as describing an annotation. The annotation is
459+
annotation : dict or plotly.graph_objs.layout.Annotation
460+
If dict(), it is interpreted as describing an annotation. The annotation is
461461
placed relative to the shape based on annotation_position (see
462462
below) unless its x or y value has been specified for the annotation
463463
passed here. xref and yref are always the same as for the added
464464
shape and cannot be overridden.
465-
annotation_position : a string containing optionally ["top", "bottom"]
466-
and ["left", "right"] specifying where the text should be anchored
465+
annotation_position : a string containing optionally ["top", "bottom"] and ["left", "right"]
466+
Specifies where the text should be anchored
467467
to on the line. Example positions are "bottom left", "right top",
468468
"right", "bottom". If an annotation is added but annotation_position is
469469
not specified, this defaults to "top right".
@@ -508,14 +508,14 @@ def add_hline(
508508
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
509509
the specified column(s). If both row and col are None, addresses the
510510
first subplot if subplots exist, or the only plot. By default is "all".
511-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
512-
it is interpreted as describing an annotation. The annotation is
511+
annotation : dict or plotly.graph_objs.layout.Annotation
512+
If dict(), it is interpreted as describing an annotation. The annotation is
513513
placed relative to the shape based on annotation_position (see
514514
below) unless its x or y value has been specified for the annotation
515515
passed here. xref and yref are always the same as for the added
516516
shape and cannot be overridden.
517-
annotation_position : a string containing optionally ["top", "bottom"]
518-
and ["left", "right"] specifying where the text should be anchored
517+
annotation_position : a string containing optionally ["top", "bottom"] and ["left", "right"]
518+
Specifies where the text should be anchored
519519
to on the line. Example positions are "bottom left", "right top",
520520
"right", "bottom". If an annotation is added but annotation_position is
521521
not specified, this defaults to "top right".
@@ -563,14 +563,14 @@ def add_vrect(
563563
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
564564
the specified column(s). If both row and col are None, addresses the
565565
first subplot if subplots exist, or the only plot. By default is "all".
566-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
567-
it is interpreted as describing an annotation. The annotation is
566+
annotation : dict or plotly.graph_objs.layout.Annotation
567+
If dict(), it is interpreted as describing an annotation. The annotation is
568568
placed relative to the shape based on annotation_position (see
569569
below) unless its x or y value has been specified for the annotation
570570
passed here. xref and yref are always the same as for the added
571571
shape and cannot be overridden.
572-
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"]
573-
and ["left", "right"] specifying where the text should be anchored
572+
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"] and ["left", "right"]
573+
Specifies where the text should be anchored
574574
to on the rectangle. Example positions are "outside top left", "inside
575575
bottom", "right", "inside left", "inside" ("outside" is not supported). If
576576
an annotation is added but annotation_position is not specified this
@@ -619,14 +619,14 @@ def add_hrect(
619619
Subplot column for shape indexed starting at 1. If 'all', addresses all rows in
620620
the specified column(s). If both row and col are None, addresses the
621621
first subplot if subplots exist, or the only plot. By default is "all".
622-
annotation : dict or plotly.graph_objs.layout.Annotation. If dict(),
623-
it is interpreted as describing an annotation. The annotation is
622+
annotation : dict or plotly.graph_objs.layout.Annotation
623+
If dict(), it is interpreted as describing an annotation. The annotation is
624624
placed relative to the shape based on annotation_position (see
625625
below) unless its x or y value has been specified for the annotation
626626
passed here. xref and yref are always the same as for the added
627627
shape and cannot be overridden.
628-
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"]
629-
and ["left", "right"] specifying where the text should be anchored
628+
annotation_position : a string containing optionally ["inside", "outside"], ["top", "bottom"] and ["left", "right"]
629+
Specifies where the text should be anchored
630630
to on the rectangle. Example positions are "outside top left", "inside
631631
bottom", "right", "inside left", "inside" ("outside" is not supported). If
632632
an annotation is added but annotation_position is not specified this

‎plotly/io/_kaleido.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ def to_image(
285285
True if the figure should be validated before being converted to
286286
an image, False otherwise.
287287
288-
engine (deprecated): str
288+
engine : str
289289
Image export engine to use. This parameter is deprecated and Orca engine support will be
290-
dropped in the next major Plotly version. Until then, the following values are supported:
290+
dropped in the next major Plotly version. Until then, the following values are supported:\n
291291
- "kaleido": Use Kaleido for image export
292292
- "orca": Use Orca for image export
293293
- "auto" (default): Use Kaleido if installed, otherwise use Orca
@@ -473,9 +473,9 @@ def write_image(
473473
True if the figure should be validated before being converted to
474474
an image, False otherwise.
475475
476-
engine (deprecated): str
476+
engine : str
477477
Image export engine to use. This parameter is deprecated and Orca engine support will be
478-
dropped in the next major Plotly version. Until then, the following values are supported:
478+
dropped in the next major Plotly version. Until then, the following values are supported:\n
479479
- "kaleido": Use Kaleido for image export
480480
- "orca": Use Orca for image export
481481
- "auto" (default): Use Kaleido if installed, otherwise use Orca

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /