Skip to content

Commit b5f72c8

Browse files
Merge pull request #1939 from joelostblom/docs-lw75
Set docstring linewidth to 75 to avoid wrapping in jupyterlab help popup
2 parents 49e39b1 + 110f391 commit b5f72c8

File tree

2 files changed

+55
-51
lines changed

2 files changed

+55
-51
lines changed

packages/python/plotly/plotly/express/_chart_types.py

+54-50
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def scatter(
4949
height=None,
5050
):
5151
"""
52-
In a scatter plot, each row of `data_frame` is represented by a symbol mark
53-
in 2D space.
52+
In a scatter plot, each row of `data_frame` is represented by a symbol
53+
mark in 2D space.
5454
"""
5555
return make_figure(args=locals(), constructor=go.Scatter)
5656

@@ -93,9 +93,9 @@ def density_contour(
9393
height=None,
9494
):
9595
"""
96-
In a density contour plot, rows of `data_frame` are grouped together into
97-
contour marks to visualize the 2D distribution of an aggregate function
98-
`histfunc` (e.g. the count or sum) of the value `z`.
96+
In a density contour plot, rows of `data_frame` are grouped together
97+
into contour marks to visualize the 2D distribution of an aggregate
98+
function `histfunc` (e.g. the count or sum) of the value `z`.
9999
"""
100100
return make_figure(
101101
args=locals(),
@@ -150,8 +150,8 @@ def density_heatmap(
150150
):
151151
"""
152152
In a density heatmap, rows of `data_frame` are grouped together into
153-
colored rectangular tiles to visualize the 2D distribution of an aggregate
154-
function `histfunc` (e.g. the count or sum) of the value `z`.
153+
colored rectangular tiles to visualize the 2D distribution of an
154+
aggregate function `histfunc` (e.g. the count or sum) of the value `z`.
155155
"""
156156
return make_figure(
157157
args=locals(),
@@ -208,8 +208,8 @@ def line(
208208
height=None,
209209
):
210210
"""
211-
In a 2D line plot, each row of `data_frame` is represented as vertex of a
212-
polyline mark in 2D space.
211+
In a 2D line plot, each row of `data_frame` is represented as vertex of
212+
a polyline mark in 2D space.
213213
"""
214214
return make_figure(args=locals(), constructor=go.Scatter)
215215

@@ -249,9 +249,9 @@ def area(
249249
height=None,
250250
):
251251
"""
252-
In a stacked area plot, each row of `data_frame` is represented as vertex
253-
of a polyline mark in 2D space. The area between successive polylines is
254-
filled.
252+
In a stacked area plot, each row of `data_frame` is represented as
253+
vertex of a polyline mark in 2D space. The area between successive
254+
polylines is filled.
255255
"""
256256
return make_figure(
257257
args=locals(),
@@ -353,8 +353,8 @@ def histogram(
353353
):
354354
"""
355355
In a histogram, rows of `data_frame` are grouped together into a
356-
rectangular mark to visualize the 1D distribution of an aggregate function
357-
`histfunc` (e.g. the count or sum) of the value `y` (or `x` if
356+
rectangular mark to visualize the 1D distribution of an aggregate
357+
function `histfunc` (e.g. the count or sum) of the value `y` (or `x` if
358358
`orientation` is `'h'`).
359359
"""
360360
return make_figure(
@@ -407,8 +407,8 @@ def violin(
407407
height=None,
408408
):
409409
"""
410-
In a violin plot, rows of `data_frame` are grouped together into a curved
411-
mark to visualize their distribution.
410+
In a violin plot, rows of `data_frame` are grouped together into a
411+
curved mark to visualize their distribution.
412412
"""
413413
return make_figure(
414414
args=locals(),
@@ -462,11 +462,10 @@ def box(
462462
In a box plot, rows of `data_frame` are grouped together into a
463463
box-and-whisker mark to visualize their distribution.
464464
465-
Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The
466-
second quartile (Q2) is marked by a line inside the box. By
467-
default, the whiskers correspond to the box' edges +/- 1.5
468-
times the interquartile range (IQR: Q3-Q1), see "points" for
469-
other options.
465+
Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The second
466+
quartile (Q2) is marked by a line inside the box. By default, the
467+
whiskers correspond to the box' edges +/- 1.5 times the interquartile
468+
range (IQR: Q3-Q1), see "points" for other options.
470469
"""
471470
return make_figure(
472471
args=locals(),
@@ -510,8 +509,8 @@ def strip(
510509
height=None,
511510
):
512511
"""
513-
In a strip plot each row of `data_frame` is represented as a jittered mark
514-
within categories.
512+
In a strip plot each row of `data_frame` is represented as a jittered
513+
mark within categories.
515514
"""
516515
return make_figure(
517516
args=locals(),
@@ -576,8 +575,8 @@ def scatter_3d(
576575
height=None,
577576
):
578577
"""
579-
In a 3D scatter plot, each row of `data_frame` is represented by a symbol
580-
mark in 3D space.
578+
In a 3D scatter plot, each row of `data_frame` is represented by a
579+
symbol mark in 3D space.
581580
"""
582581
return make_figure(args=locals(), constructor=go.Scatter3d)
583582

@@ -623,8 +622,8 @@ def line_3d(
623622
height=None,
624623
):
625624
"""
626-
In a 3D line plot, each row of `data_frame` is represented as vertex of a
627-
polyline mark in 3D space.
625+
In a 3D line plot, each row of `data_frame` is represented as vertex of
626+
a polyline mark in 3D space.
628627
"""
629628
return make_figure(args=locals(), constructor=go.Scatter3d)
630629

@@ -699,8 +698,8 @@ def line_ternary(
699698
height=None,
700699
):
701700
"""
702-
In a ternary line plot, each row of `data_frame` is represented as vertex
703-
of a polyline mark in ternary coordinates.
701+
In a ternary line plot, each row of `data_frame` is represented as
702+
vertex of a polyline mark in ternary coordinates.
704703
"""
705704
return make_figure(args=locals(), constructor=go.Scatterternary)
706705

@@ -784,8 +783,8 @@ def line_polar(
784783
height=None,
785784
):
786785
"""
787-
In a polar line plot, each row of `data_frame` is represented as vertex of
788-
a polyline mark in polar coordinates.
786+
In a polar line plot, each row of `data_frame` is represented as vertex
787+
of a polyline mark in polar coordinates.
789788
"""
790789
return make_figure(args=locals(), constructor=go.Scatterpolar)
791790

@@ -858,8 +857,8 @@ def choropleth(
858857
height=None,
859858
):
860859
"""
861-
In a choropleth map, each row of `data_frame` is represented by a colored
862-
region mark on a map.
860+
In a choropleth map, each row of `data_frame` is represented by a
861+
colored region mark on a map.
863862
"""
864863
return make_figure(
865864
args=locals(),
@@ -903,8 +902,8 @@ def scatter_geo(
903902
height=None,
904903
):
905904
"""
906-
In a geographic scatter plot, each row of `data_frame` is represented by a
907-
symbol mark on a map.
905+
In a geographic scatter plot, each row of `data_frame` is represented
906+
by a symbol mark on a map.
908907
"""
909908
return make_figure(
910909
args=locals(),
@@ -1102,8 +1101,8 @@ def line_mapbox(
11021101
height=None,
11031102
):
11041103
"""
1105-
In a Mapbox line plot, each row of `data_frame` is represented as vertex of
1106-
a polyline mark on a Mapbox map.
1104+
In a Mapbox line plot, each row of `data_frame` is represented as
1105+
vertex of a polyline mark on a Mapbox map.
11071106
"""
11081107
return make_figure(args=locals(), constructor=go.Scattermapbox)
11091108

@@ -1138,8 +1137,9 @@ def scatter_matrix(
11381137
):
11391138
"""
11401139
In a scatter plot matrix (or SPLOM), each row of `data_frame` is
1141-
represented by a multiple symbol marks, one in each cell of a grid of 2D
1142-
scatter plots, which plot each pair of `dimensions` against each other.
1140+
represented by a multiple symbol marks, one in each cell of a grid of
1141+
2D scatter plots, which plot each pair of `dimensions` against each
1142+
other.
11431143
"""
11441144
return make_figure(
11451145
args=locals(), constructor=go.Splom, layout_patch=dict(dragmode="select")
@@ -1163,9 +1163,9 @@ def parallel_coordinates(
11631163
height=None,
11641164
):
11651165
"""
1166-
In a parallel coordinates plot, each row of `data_frame` is represented by
1167-
a polyline mark which traverses a set of parallel axes, one for each of the
1168-
`dimensions`.
1166+
In a parallel coordinates plot, each row of `data_frame` is represented
1167+
by a polyline mark which traverses a set of parallel axes, one for each
1168+
of the `dimensions`.
11691169
"""
11701170
return make_figure(args=locals(), constructor=go.Parcoords)
11711171

@@ -1187,10 +1187,10 @@ def parallel_categories(
11871187
height=None,
11881188
):
11891189
"""
1190-
In a parallel categories (or parallel sets) plot, each row of `data_frame`
1191-
is grouped with other rows that share the same values of `dimensions` and
1192-
then plotted as a polyline mark through a set of parallel axes, one for
1193-
each of the `dimensions`.
1190+
In a parallel categories (or parallel sets) plot, each row of
1191+
`data_frame` is grouped with other rows that share the same values of
1192+
`dimensions` and then plotted as a polyline mark through a set of
1193+
parallel axes, one for each of the `dimensions`.
11941194
"""
11951195
return make_figure(args=locals(), constructor=go.Parcats)
11961196

@@ -1217,7 +1217,8 @@ def pie(
12171217
hole=None,
12181218
):
12191219
"""
1220-
In a pie plot, each row of `data_frame` is represented as a sector of a pie.
1220+
In a pie plot, each row of `data_frame` is represented as a sector of a
1221+
pie.
12211222
"""
12221223
if color_discrete_sequence is not None:
12231224
layout_patch = {"piecolorway": color_discrete_sequence}
@@ -1309,7 +1310,8 @@ def treemap(
13091310
maxdepth=None,
13101311
):
13111312
"""
1312-
A treemap plot represents hierarchial data as nested rectangular sectors.
1313+
A treemap plot represents hierarchial data as nested rectangular
1314+
sectors.
13131315
"""
13141316
if color_discrete_sequence is not None:
13151317
layout_patch = {"treemapcolorway": color_discrete_sequence}
@@ -1356,7 +1358,8 @@ def funnel(
13561358
height=None,
13571359
):
13581360
"""
1359-
In a funnel plot, each row of `data_frame` is represented as a rectangular sector of a funnel.
1361+
In a funnel plot, each row of `data_frame` is represented as a
1362+
rectangular sector of a funnel.
13601363
"""
13611364
return make_figure(
13621365
args=locals(),
@@ -1386,7 +1389,8 @@ def funnel_area(
13861389
opacity=None,
13871390
):
13881391
"""
1389-
In a funnel area plot, each row of `data_frame` is represented as a trapezoidal sector of a funnel.
1392+
In a funnel area plot, each row of `data_frame` is represented as a
1393+
trapezoidal sector of a funnel.
13901394
"""
13911395
if color_discrete_sequence is not None:
13921396
layout_patch = {"funnelareacolorway": color_discrete_sequence}

packages/python/plotly/plotly/express/_doc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@
494494

495495

496496
def make_docstring(fn, override_dict={}):
497-
tw = TextWrapper(width=77, initial_indent=" ", subsequent_indent=" ")
497+
tw = TextWrapper(width=75, initial_indent=" ", subsequent_indent=" ")
498498
result = (fn.__doc__ or "") + "\nParameters\n----------\n"
499499
for param in inspect.getargspec(fn)[0]:
500500
if override_dict.get(param):

0 commit comments

Comments
 (0)