Skip to content

Commit be1a182

Browse files
Merge pull request #1835 from joelostblom/reformat-docstring
Reformat docstrings
2 parents 25d5c59 + 813f1c2 commit be1a182

File tree

3 files changed

+234
-148
lines changed

3 files changed

+234
-148
lines changed

Diff for: packages/python/plotly/plotly/express/_chart_types.py

+58-39
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def scatter(
4848
height=None,
4949
):
5050
"""
51-
In a scatter plot, each row of `data_frame` is represented by a symbol mark in 2D space.
51+
In a scatter plot, each row of `data_frame` is represented by a symbol mark
52+
in 2D space.
5253
"""
5354
return make_figure(args=locals(), constructor=go.Scatter)
5455

@@ -90,9 +91,9 @@ def density_contour(
9091
height=None,
9192
):
9293
"""
93-
In a density contour plot, rows of `data_frame` are grouped together into contour marks to \
94-
visualize the 2D distribution of an aggregate function `histfunc` (e.g. the count or sum) \
95-
of the value `z`.
94+
In a density contour plot, rows of `data_frame` are grouped together into
95+
contour marks to visualize the 2D distribution of an aggregate function
96+
`histfunc` (e.g. the count or sum) of the value `z`.
9697
"""
9798
return make_figure(
9899
args=locals(),
@@ -145,9 +146,9 @@ def density_heatmap(
145146
height=None,
146147
):
147148
"""
148-
In a density heatmap, rows of `data_frame` are grouped together into colored \
149-
rectangular tiles to visualize the 2D distribution of an aggregate function \
150-
`histfunc` (e.g. the count or sum) of the value `z`.
149+
In a density heatmap, rows of `data_frame` are grouped together into
150+
colored rectangular tiles to visualize the 2D distribution of an aggregate
151+
function `histfunc` (e.g. the count or sum) of the value `z`.
151152
"""
152153
return make_figure(
153154
args=locals(),
@@ -203,7 +204,8 @@ def line(
203204
height=None,
204205
):
205206
"""
206-
In a 2D line plot, each row of `data_frame` is represented as vertex of a polyline mark in 2D space.
207+
In a 2D line plot, each row of `data_frame` is represented as vertex of a
208+
polyline mark in 2D space.
207209
"""
208210
return make_figure(args=locals(), constructor=go.Scatter)
209211

@@ -242,7 +244,9 @@ def area(
242244
height=None,
243245
):
244246
"""
245-
In a stacked area plot, each row of `data_frame` is represented as vertex of a polyline mark in 2D space. The area between successive polylines is filled.
247+
In a stacked area plot, each row of `data_frame` is represented as vertex
248+
of a polyline mark in 2D space. The area between successive polylines is
249+
filled.
246250
"""
247251
return make_figure(
248252
args=locals(),
@@ -293,7 +297,8 @@ def bar(
293297
height=None,
294298
):
295299
"""
296-
In a bar plot, each row of `data_frame` is represented as a rectangular mark.
300+
In a bar plot, each row of `data_frame` is represented as a rectangular
301+
mark.
297302
"""
298303
return make_figure(
299304
args=locals(),
@@ -340,9 +345,10 @@ def histogram(
340345
height=None,
341346
):
342347
"""
343-
In a histogram, rows of `data_frame` are grouped together into a rectangular mark to \
344-
visualize the 1D distribution of an aggregate function `histfunc` (e.g. the count or sum) \
345-
of the value `y` (or `x` if `orientation` is `'h'`).
348+
In a histogram, rows of `data_frame` are grouped together into a
349+
rectangular mark to visualize the 1D distribution of an aggregate function
350+
`histfunc` (e.g. the count or sum) of the value `y` (or `x` if
351+
`orientation` is `'h'`).
346352
"""
347353
return make_figure(
348354
args=locals(),
@@ -393,8 +399,8 @@ def violin(
393399
height=None,
394400
):
395401
"""
396-
In a violin plot, rows of `data_frame` are grouped together into a curved mark to \
397-
visualize their distribution.
402+
In a violin plot, rows of `data_frame` are grouped together into a curved
403+
mark to visualize their distribution.
398404
"""
399405
return make_figure(
400406
args=locals(),
@@ -444,8 +450,8 @@ def box(
444450
height=None,
445451
):
446452
"""
447-
In a box plot, rows of `data_frame` are grouped together into a box-and-whisker mark to \
448-
visualize their distribution.
453+
In a box plot, rows of `data_frame` are grouped together into a
454+
box-and-whisker mark to visualize their distribution.
449455
"""
450456
return make_figure(
451457
args=locals(),
@@ -488,7 +494,8 @@ def strip(
488494
height=None,
489495
):
490496
"""
491-
In a strip plot each row of `data_frame` is represented as a jittered mark within categories.
497+
In a strip plot each row of `data_frame` is represented as a jittered mark
498+
within categories.
492499
"""
493500
return make_figure(
494501
args=locals(),
@@ -553,7 +560,8 @@ def scatter_3d(
553560
height=None,
554561
):
555562
"""
556-
In a 3D scatter plot, each row of `data_frame` is represented by a symbol mark in 3D space.
563+
In a 3D scatter plot, each row of `data_frame` is represented by a symbol
564+
mark in 3D space.
557565
"""
558566
return make_figure(args=locals(), constructor=go.Scatter3d)
559567

@@ -599,7 +607,8 @@ def line_3d(
599607
height=None,
600608
):
601609
"""
602-
In a 3D line plot, each row of `data_frame` is represented as vertex of a polyline mark in 3D space.
610+
In a 3D line plot, each row of `data_frame` is represented as vertex of a
611+
polyline mark in 3D space.
603612
"""
604613
return make_figure(args=locals(), constructor=go.Scatter3d)
605614

@@ -638,7 +647,8 @@ def scatter_ternary(
638647
height=None,
639648
):
640649
"""
641-
In a ternary scatter plot, each row of `data_frame` is represented by a symbol mark in ternary coordinates.
650+
In a ternary scatter plot, each row of `data_frame` is represented by a
651+
symbol mark in ternary coordinates.
642652
"""
643653
return make_figure(args=locals(), constructor=go.Scatterternary)
644654

@@ -673,7 +683,8 @@ def line_ternary(
673683
height=None,
674684
):
675685
"""
676-
In a ternary line plot, each row of `data_frame` is represented as vertex of a polyline mark in ternary coordinates.
686+
In a ternary line plot, each row of `data_frame` is represented as vertex
687+
of a polyline mark in ternary coordinates.
677688
"""
678689
return make_figure(args=locals(), constructor=go.Scatterternary)
679690

@@ -716,8 +727,8 @@ def scatter_polar(
716727
height=None,
717728
):
718729
"""
719-
In a polar scatter plot, each row of `data_frame` is represented by a symbol mark in
720-
polar coordinates.
730+
In a polar scatter plot, each row of `data_frame` is represented by a
731+
symbol mark in polar coordinates.
721732
"""
722733
return make_figure(args=locals(), constructor=go.Scatterpolar)
723734

@@ -757,7 +768,8 @@ def line_polar(
757768
height=None,
758769
):
759770
"""
760-
In a polar line plot, each row of `data_frame` is represented as vertex of a polyline mark in polar coordinates.
771+
In a polar line plot, each row of `data_frame` is represented as vertex of
772+
a polyline mark in polar coordinates.
761773
"""
762774
return make_figure(args=locals(), constructor=go.Scatterpolar)
763775

@@ -791,7 +803,8 @@ def bar_polar(
791803
height=None,
792804
):
793805
"""
794-
In a polar bar plot, each row of `data_frame` is represented as a wedge mark in polar coordinates.
806+
In a polar bar plot, each row of `data_frame` is represented as a wedge
807+
mark in polar coordinates.
795808
"""
796809
return make_figure(
797810
args=locals(),
@@ -831,7 +844,8 @@ def choropleth(
831844
height=None,
832845
):
833846
"""
834-
In a choropleth map, each row of `data_frame` is represented by a colored region mark on a map.
847+
In a choropleth map, each row of `data_frame` is represented by a colored
848+
region mark on a map.
835849
"""
836850
return make_figure(
837851
args=locals(),
@@ -875,7 +889,8 @@ def scatter_geo(
875889
height=None,
876890
):
877891
"""
878-
In a geographic scatter plot, each row of `data_frame` is represented by a symbol mark on a map.
892+
In a geographic scatter plot, each row of `data_frame` is represented by a
893+
symbol mark on a map.
879894
"""
880895
return make_figure(
881896
args=locals(),
@@ -917,7 +932,8 @@ def line_geo(
917932
height=None,
918933
):
919934
"""
920-
In a geographic line plot, each row of `data_frame` is represented as vertex of a polyline mark on a map.
935+
In a geographic line plot, each row of `data_frame` is represented as
936+
vertex of a polyline mark on a map.
921937
"""
922938
return make_figure(
923939
args=locals(),
@@ -957,7 +973,8 @@ def scatter_mapbox(
957973
height=None,
958974
):
959975
"""
960-
In a Mapbox scatter plot, each row of `data_frame` is represented by a symbol mark on a Mapbox map.
976+
In a Mapbox scatter plot, each row of `data_frame` is represented by a
977+
symbol mark on a Mapbox map.
961978
"""
962979
return make_figure(args=locals(), constructor=go.Scattermapbox)
963980

@@ -988,7 +1005,8 @@ def line_mapbox(
9881005
height=None,
9891006
):
9901007
"""
991-
In a Mapbox line plot, each row of `data_frame` is represented as vertex of a polyline mark on a Mapbox map.
1008+
In a Mapbox line plot, each row of `data_frame` is represented as vertex of
1009+
a polyline mark on a Mapbox map.
9921010
"""
9931011
return make_figure(args=locals(), constructor=go.Scattermapbox)
9941012

@@ -1022,9 +1040,9 @@ def scatter_matrix(
10221040
height=None,
10231041
):
10241042
"""
1025-
In a scatter plot matrix (or SPLOM), each row of `data_frame` is represented \
1026-
by a multiple symbol marks, one in each cell of a grid of 2D scatter plots, which \
1027-
plot each pair of `dimensions` against each other.
1043+
In a scatter plot matrix (or SPLOM), each row of `data_frame` is
1044+
represented by a multiple symbol marks, one in each cell of a grid of 2D
1045+
scatter plots, which plot each pair of `dimensions` against each other.
10281046
"""
10291047
return make_figure(
10301048
args=locals(), constructor=go.Splom, layout_patch=dict(dragmode="select")
@@ -1048,8 +1066,8 @@ def parallel_coordinates(
10481066
height=None,
10491067
):
10501068
"""
1051-
In a parallel coordinates plot, each row of `data_frame` is represented \
1052-
by a polyline mark which traverses a set of parallel axes, one for each of the \
1069+
In a parallel coordinates plot, each row of `data_frame` is represented by
1070+
a polyline mark which traverses a set of parallel axes, one for each of the
10531071
`dimensions`.
10541072
"""
10551073
return make_figure(args=locals(), constructor=go.Parcoords)
@@ -1072,9 +1090,10 @@ def parallel_categories(
10721090
height=None,
10731091
):
10741092
"""
1075-
In a parallel categories (or parallel sets) plot, each row of `data_frame` is \
1076-
grouped with other rows that share the same values of `dimensions` and then plotted \
1077-
as a polyline mark through a set of parallel axes, one for each of the `dimensions`.
1093+
In a parallel categories (or parallel sets) plot, each row of `data_frame`
1094+
is grouped with other rows that share the same values of `dimensions` and
1095+
then plotted as a polyline mark through a set of parallel axes, one for
1096+
each of the `dimensions`.
10781097
"""
10791098
return make_figure(args=locals(), constructor=go.Parcats)
10801099

0 commit comments

Comments
 (0)