Skip to content

Commit 8d12a05

Browse files
committed
Fixed formatting for 'Colorscale', 'CompoundArray', and 'BaseData' types.
1 parent 01da1c6 commit 8d12a05

File tree

434 files changed

+2405
-1861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

434 files changed

+2405
-1861
lines changed

_plotly_utils/basevalidators.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,26 +1560,26 @@ def description(self):
15601560
colorscales_str = "\n".join(
15611561
textwrap.wrap(
15621562
repr(sorted(list(self.named_colorscales))),
1563-
initial_indent=" " * 12,
1564-
subsequent_indent=" " * 13,
1563+
initial_indent=" " * INDENT,
1564+
subsequent_indent=" " * INDENT,
15651565
break_on_hyphens=False,
15661566
width=80,
15671567
)
15681568
)
15691569

15701570
desc = """\
15711571
The '{plotly_name}' property is a colorscale and may be
1572-
specified as:
1573-
- A list of colors that will be spaced evenly to create the colorscale.
1572+
specified as:\n
1573+
- A list of colors that will be spaced evenly to create the colorscale.
15741574
Many predefined colorscale lists are included in the sequential, diverging,
15751575
and cyclical modules in the plotly.colors package.
1576-
- A list of 2-element lists where the first element is the
1576+
- A list of 2-element lists where the first element is the
15771577
normalized color level value (starting at 0 and ending at 1),
15781578
and the second item is a valid color string.
15791579
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
1580-
- One of the following named colorscales:
1581-
{colorscales_str}.
1582-
Appending '_r' to a named colorscale reverses it.
1580+
- One of the following named colorscales:\n
1581+
{colorscales_str}.\n
1582+
Appending '_r' to a named colorscale reverses it.
15831583
""".format(plotly_name=self.plotly_name, colorscales_str=colorscales_str)
15841584

15851585
return desc
@@ -1817,13 +1817,13 @@ def description(self):
18171817
desc = (
18181818
"""\
18191819
The '{plotly_name}' property is a flaglist and may be specified
1820-
as a string containing:"""
1820+
as a string containing:\n"""
18211821
).format(plotly_name=self.plotly_name)
18221822

18231823
# Flags
18241824
desc = desc + (
18251825
"""
1826-
- Any combination of {flags} joined with '+' characters
1826+
- Any combination of {flags} joined with '+' characters
18271827
(e.g. '{eg_flag}')"""
18281828
).format(flags=self.flags, eg_flag="+".join(self.flags[:2]))
18291829

@@ -1838,7 +1838,7 @@ def description(self):
18381838
desc = (
18391839
desc
18401840
+ """
1841-
- A list or array of the above"""
1841+
- A list or array of the above"""
18421842
)
18431843

18441844
return desc
@@ -2491,9 +2491,9 @@ def description(self):
24912491
desc = (
24922492
"""\
24932493
The '{plotly_name}' property is a tuple of instances of
2494-
{class_str} that may be specified as:
2495-
- A list or tuple of instances of {module_str}.{class_str}
2496-
- A list or tuple of dicts of string/value properties that
2494+
{class_str} that may be specified as:\n
2495+
- A list or tuple of instances of {module_str}.{class_str}
2496+
- A list or tuple of dicts of string/value properties that
24972497
will be passed to the {class_str} constructor"""
24982498
).format(
24992499
plotly_name=self.plotly_name,
@@ -2574,17 +2574,17 @@ def description(self):
25742574
desc = (
25752575
"""\
25762576
The '{plotly_name}' property is a tuple of trace instances
2577-
that may be specified as:
2578-
- A list or tuple of trace instances
2577+
that may be specified as:\n
2578+
- A list or tuple of trace instances
25792579
(e.g. [Scatter(...), Bar(...)])
2580-
- A single trace instance
2580+
- A single trace instance
25812581
(e.g. Scatter(...), Bar(...), etc.)
2582-
- A list or tuple of dicts of string/value properties where:
2583-
- The 'type' property specifies the trace type
2582+
- A list or tuple of dicts of string/value properties where:
2583+
- The 'type' property specifies the trace type\n
25842584
{trace_types}
25852585
2586-
- All remaining properties are passed to the constructor of
2587-
the specified trace type
2586+
- All remaining properties are passed to the constructor of
2587+
the specified trace type
25882588
25892589
(e.g. [{{'type': 'scatter', ...}}, {{'type': 'bar, ...}}])"""
25902590
).format(plotly_name=self.plotly_name, trace_types=trace_types_wrapped)

plotly/graph_objects/_bar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,11 @@ def hoverinfo(self):
314314
315315
The 'hoverinfo' property is a flaglist and may be specified
316316
as a string containing:
317-
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
317+
318+
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
318319
(e.g. 'x+y')
319320
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
320-
- A list or array of the above
321+
- A list or array of the above
321322
322323
Returns
323324
-------

plotly/graph_objects/_barpolar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,11 @@ def hoverinfo(self):
185185
186186
The 'hoverinfo' property is a flaglist and may be specified
187187
as a string containing:
188-
- Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters
188+
189+
- Any combination of ['r', 'theta', 'text', 'name'] joined with '+' characters
189190
(e.g. 'r+theta')
190191
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
191-
- A list or array of the above
192+
- A list or array of the above
192193
193194
Returns
194195
-------

plotly/graph_objects/_box.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,11 @@ def hoverinfo(self):
288288
289289
The 'hoverinfo' property is a flaglist and may be specified
290290
as a string containing:
291-
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
291+
292+
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
292293
(e.g. 'x+y')
293294
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
294-
- A list or array of the above
295+
- A list or array of the above
295296
296297
Returns
297298
-------
@@ -349,7 +350,8 @@ def hoveron(self):
349350
350351
The 'hoveron' property is a flaglist and may be specified
351352
as a string containing:
352-
- Any combination of ['boxes', 'points'] joined with '+' characters
353+
354+
- Any combination of ['boxes', 'points'] joined with '+' characters
353355
(e.g. 'boxes+points')
354356
355357
Returns

plotly/graph_objects/_candlestick.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,11 @@ def hoverinfo(self):
201201
202202
The 'hoverinfo' property is a flaglist and may be specified
203203
as a string containing:
204-
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
204+
205+
- Any combination of ['x', 'y', 'z', 'text', 'name'] joined with '+' characters
205206
(e.g. 'x+y')
206207
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
207-
- A list or array of the above
208+
- A list or array of the above
208209
209210
Returns
210211
-------

plotly/graph_objects/_choropleth.py

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -143,30 +143,31 @@ def colorscale(self):
143143
144144
The 'colorscale' property is a colorscale and may be
145145
specified as:
146-
- A list of colors that will be spaced evenly to create the colorscale.
146+
147+
- A list of colors that will be spaced evenly to create the colorscale.
147148
Many predefined colorscale lists are included in the sequential, diverging,
148149
and cyclical modules in the plotly.colors package.
149-
- A list of 2-element lists where the first element is the
150+
- A list of 2-element lists where the first element is the
150151
normalized color level value (starting at 0 and ending at 1),
151152
and the second item is a valid color string.
152153
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
153-
- One of the following named colorscales:
154-
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
155-
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg',
156-
'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl',
157-
'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric',
158-
'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys',
159-
'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet',
160-
'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges',
161-
'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl',
162-
'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn',
163-
'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu',
164-
'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar',
165-
'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
166-
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid',
167-
'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr',
168-
'ylorrd'].
169-
Appending '_r' to a named colorscale reverses it.
154+
- One of the following named colorscales:
155+
156+
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
157+
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', 'brwnyl',
158+
'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', 'darkmint', 'deep',
159+
'delta', 'dense', 'earth', 'edge', 'electric', 'emrld', 'fall',
160+
'geyser', 'gnbu', 'gray', 'greens', 'greys', 'haline', 'hot', 'hsv',
161+
'ice', 'icefire', 'inferno', 'jet', 'magenta', 'magma', 'matter',
162+
'mint', 'mrybm', 'mygbm', 'oranges', 'orrd', 'oryel', 'oxy', 'peach',
163+
'phase', 'picnic', 'pinkyl', 'piyg', 'plasma', 'plotly3', 'portland',
164+
'prgn', 'pubu', 'pubugn', 'puor', 'purd', 'purp', 'purples', 'purpor',
165+
'rainbow', 'rdbu', 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds',
166+
'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
167+
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'turbo',
168+
'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
169+
170+
Appending '_r' to a named colorscale reverses it.
170171
171172
Returns
172173
-------
@@ -295,10 +296,11 @@ def hoverinfo(self):
295296
296297
The 'hoverinfo' property is a flaglist and may be specified
297298
as a string containing:
298-
- Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
299+
300+
- Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
299301
(e.g. 'location+z')
300302
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
301-
- A list or array of the above
303+
- A list or array of the above
302304
303305
Returns
304306
-------

plotly/graph_objects/_choroplethmap.py

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -167,30 +167,31 @@ def colorscale(self):
167167
168168
The 'colorscale' property is a colorscale and may be
169169
specified as:
170-
- A list of colors that will be spaced evenly to create the colorscale.
170+
171+
- A list of colors that will be spaced evenly to create the colorscale.
171172
Many predefined colorscale lists are included in the sequential, diverging,
172173
and cyclical modules in the plotly.colors package.
173-
- A list of 2-element lists where the first element is the
174+
- A list of 2-element lists where the first element is the
174175
normalized color level value (starting at 0 and ending at 1),
175176
and the second item is a valid color string.
176177
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
177-
- One of the following named colorscales:
178-
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
179-
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg',
180-
'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl',
181-
'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric',
182-
'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys',
183-
'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet',
184-
'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges',
185-
'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl',
186-
'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn',
187-
'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu',
188-
'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar',
189-
'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
190-
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid',
191-
'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr',
192-
'ylorrd'].
193-
Appending '_r' to a named colorscale reverses it.
178+
- One of the following named colorscales:
179+
180+
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
181+
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', 'brwnyl',
182+
'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', 'darkmint', 'deep',
183+
'delta', 'dense', 'earth', 'edge', 'electric', 'emrld', 'fall',
184+
'geyser', 'gnbu', 'gray', 'greens', 'greys', 'haline', 'hot', 'hsv',
185+
'ice', 'icefire', 'inferno', 'jet', 'magenta', 'magma', 'matter',
186+
'mint', 'mrybm', 'mygbm', 'oranges', 'orrd', 'oryel', 'oxy', 'peach',
187+
'phase', 'picnic', 'pinkyl', 'piyg', 'plasma', 'plotly3', 'portland',
188+
'prgn', 'pubu', 'pubugn', 'puor', 'purd', 'purp', 'purples', 'purpor',
189+
'rainbow', 'rdbu', 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds',
190+
'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
191+
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'turbo',
192+
'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
193+
194+
Appending '_r' to a named colorscale reverses it.
194195
195196
Returns
196197
-------
@@ -294,10 +295,11 @@ def hoverinfo(self):
294295
295296
The 'hoverinfo' property is a flaglist and may be specified
296297
as a string containing:
297-
- Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
298+
299+
- Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
298300
(e.g. 'location+z')
299301
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
300-
- A list or array of the above
302+
- A list or array of the above
301303
302304
Returns
303305
-------

plotly/graph_objects/_choroplethmapbox.py

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -168,30 +168,31 @@ def colorscale(self):
168168
169169
The 'colorscale' property is a colorscale and may be
170170
specified as:
171-
- A list of colors that will be spaced evenly to create the colorscale.
171+
172+
- A list of colors that will be spaced evenly to create the colorscale.
172173
Many predefined colorscale lists are included in the sequential, diverging,
173174
and cyclical modules in the plotly.colors package.
174-
- A list of 2-element lists where the first element is the
175+
- A list of 2-element lists where the first element is the
175176
normalized color level value (starting at 0 and ending at 1),
176177
and the second item is a valid color string.
177178
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
178-
- One of the following named colorscales:
179-
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
180-
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg',
181-
'brwnyl', 'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl',
182-
'darkmint', 'deep', 'delta', 'dense', 'earth', 'edge', 'electric',
183-
'emrld', 'fall', 'geyser', 'gnbu', 'gray', 'greens', 'greys',
184-
'haline', 'hot', 'hsv', 'ice', 'icefire', 'inferno', 'jet',
185-
'magenta', 'magma', 'matter', 'mint', 'mrybm', 'mygbm', 'oranges',
186-
'orrd', 'oryel', 'oxy', 'peach', 'phase', 'picnic', 'pinkyl',
187-
'piyg', 'plasma', 'plotly3', 'portland', 'prgn', 'pubu', 'pubugn',
188-
'puor', 'purd', 'purp', 'purples', 'purpor', 'rainbow', 'rdbu',
189-
'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar',
190-
'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
191-
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid',
192-
'turbo', 'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr',
193-
'ylorrd'].
194-
Appending '_r' to a named colorscale reverses it.
179+
- One of the following named colorscales:
180+
181+
['aggrnyl', 'agsunset', 'algae', 'amp', 'armyrose', 'balance',
182+
'blackbody', 'bluered', 'blues', 'blugrn', 'bluyl', 'brbg', 'brwnyl',
183+
'bugn', 'bupu', 'burg', 'burgyl', 'cividis', 'curl', 'darkmint', 'deep',
184+
'delta', 'dense', 'earth', 'edge', 'electric', 'emrld', 'fall',
185+
'geyser', 'gnbu', 'gray', 'greens', 'greys', 'haline', 'hot', 'hsv',
186+
'ice', 'icefire', 'inferno', 'jet', 'magenta', 'magma', 'matter',
187+
'mint', 'mrybm', 'mygbm', 'oranges', 'orrd', 'oryel', 'oxy', 'peach',
188+
'phase', 'picnic', 'pinkyl', 'piyg', 'plasma', 'plotly3', 'portland',
189+
'prgn', 'pubu', 'pubugn', 'puor', 'purd', 'purp', 'purples', 'purpor',
190+
'rainbow', 'rdbu', 'rdgy', 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds',
191+
'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn',
192+
'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'turbo',
193+
'twilight', 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
194+
195+
Appending '_r' to a named colorscale reverses it.
195196
196197
Returns
197198
-------
@@ -295,10 +296,11 @@ def hoverinfo(self):
295296
296297
The 'hoverinfo' property is a flaglist and may be specified
297298
as a string containing:
298-
- Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
299+
300+
- Any combination of ['location', 'z', 'text', 'name'] joined with '+' characters
299301
(e.g. 'location+z')
300302
OR exactly one of ['all', 'none', 'skip'] (e.g. 'skip')
301-
- A list or array of the above
303+
- A list or array of the above
302304
303305
Returns
304306
-------

0 commit comments

Comments
 (0)