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

Appearance settings

Commit a17e6a3

Browse filesBrowse files
emmanuellejonmmease
authored andcommitted
Reversed colorscale (#1933)
* reversed colorscales with _r * codegen
1 parent 151b63d commit a17e6a3
Copy full SHA for a17e6a3

File tree

Expand file treeCollapse file tree

47 files changed

+208
-57
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

47 files changed

+208
-57
lines changed

‎packages/python/plotly/_plotly_utils/basevalidators.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/basevalidators.py
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,8 @@ def named_colorscales(self):
15321532
and len(c) == 2
15331533
and isinstance(c[0], str)
15341534
and isinstance(c[1], list)
1535+
and not c[0].endswith("_r")
1536+
and not c[0].startswith("_")
15351537
}
15361538

15371539
return self._named_colorscales
@@ -1558,7 +1560,8 @@ def description(self):
15581560
and the second item is a valid color string.
15591561
(e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']])
15601562
- One of the following named colorscales:
1561-
{colorscales_str}
1563+
{colorscales_str}.
1564+
Appending '_r' to a named colorscale reverses it.
15621565
""".format(
15631566
plotly_name=self.plotly_name, colorscales_str=colorscales_str
15641567
)
@@ -1575,13 +1578,16 @@ def validate_coerce(self, v):
15751578
if v_lower in self.named_colorscales:
15761579
# Convert to color list
15771580
v = self.named_colorscales[v_lower]
1578-
1581+
v_valid = True
1582+
elif v_lower.endswith("_r") and v_lower[:-2] in self.named_colorscales:
1583+
v = self.named_colorscales[v_lower[:-2]][::-1]
1584+
v_valid = True
1585+
#
1586+
if v_valid:
15791587
# Convert to list of lists colorscale
15801588
d = len(v) - 1
15811589
v = [[(1.0 * i) / (1.0 * d), x] for i, x in enumerate(v)]
15821590

1583-
v_valid = True
1584-
15851591
elif is_array(v) and len(v) > 0:
15861592
# If firset element is a string, treat as colorsequence
15871593
if isinstance(v[0], string_types):

‎packages/python/plotly/_plotly_utils/colors/_swatches.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/_swatches.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def _swatches(module_names, module_contents, template=None):
2020
sequences = [
2121
(k, v)
2222
for k, v in module_contents.items()
23-
if not (k.startswith("_") or k == "swatches")
23+
if not (k.startswith("_") or k == "swatches" or k.endswith("_r"))
2424
]
2525

2626
return go.Figure(

‎packages/python/plotly/_plotly_utils/colors/carto.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/carto.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,10 @@ def swatches(template=None):
382382
"rgb(237, 100, 90)",
383383
"rgb(165, 170, 153)",
384384
]
385+
386+
# Prefix variable names with _ so that they will not be added to the swatches
387+
_contents = dict(globals())
388+
for _k, _cols in _contents.items():
389+
if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"):
390+
continue
391+
globals()[_k + "_r"] = _cols[::-1]

‎packages/python/plotly/_plotly_utils/colors/cmocean.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/cmocean.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,10 @@ def swatches(template=None):
267267
"rgb(111, 23, 91)",
268268
"rgb(51, 13, 53)",
269269
]
270+
271+
# Prefix variable names with _ so that they will not be added to the swatches
272+
_contents = dict(globals())
273+
for _k, _cols in _contents.items():
274+
if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"):
275+
continue
276+
globals()[_k + "_r"] = _cols[::-1]

‎packages/python/plotly/_plotly_utils/colors/colorbrewer.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/colorbrewer.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,10 @@ def swatches(template=None):
456456
"rgb(189,0,38)",
457457
"rgb(128,0,38)",
458458
]
459+
460+
# Prefix variable names with _ so that they will not be added to the swatches
461+
_contents = dict(globals())
462+
for _k, _cols in _contents.items():
463+
if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"):
464+
continue
465+
globals()[_k + "_r"] = _cols[::-1]

‎packages/python/plotly/_plotly_utils/colors/cyclical.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/cyclical.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,10 @@ def swatches(template=None):
125125
"#9139fa",
126126
"#c543fa",
127127
]
128+
129+
# Prefix variable names with _ so that they will not be added to the swatches
130+
_contents = dict(globals())
131+
for _k, _cols in _contents.items():
132+
if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"):
133+
continue
134+
globals()[_k + "_r"] = _cols[::-1]

‎packages/python/plotly/_plotly_utils/colors/diverging.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/diverging.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ def swatches(template=None):
3030

3131

3232
swatches.__doc__ = _swatches.__doc__
33+
34+
# Prefix variable names with _ so that they will not be added to the swatches
35+
_contents = dict(globals())
36+
for _k, _cols in _contents.items():
37+
if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"):
38+
continue
39+
globals()[_k + "_r"] = _cols[::-1]

‎packages/python/plotly/_plotly_utils/colors/plotlyjs.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/plotlyjs.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,10 @@
179179
scale_name=scale_name, scale_sequence=scale_sequence
180180
)
181181
)
182+
183+
# Prefix variable names with _ so that they will not be added to the swatches
184+
_contents = dict(globals())
185+
for _k, _cols in _contents.items():
186+
if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"):
187+
continue
188+
globals()[_k + "_r"] = _cols[::-1]

‎packages/python/plotly/_plotly_utils/colors/qualitative.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/qualitative.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,10 @@ def swatches(template=None):
145145

146146
from .colorbrewer import Set1, Pastel1, Dark2, Set2, Pastel2, Set3 # noqa: F401
147147
from .carto import Antique, Bold, Pastel, Prism, Safe, Vivid # noqa: F401
148+
149+
# Prefix variable names with _ so that they will not be added to the swatches
150+
_contents = dict(globals())
151+
for _k, _cols in _contents.items():
152+
if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"):
153+
continue
154+
globals()[_k + "_r"] = _cols[::-1]

‎packages/python/plotly/_plotly_utils/colors/sequential.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/colors/sequential.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,10 @@ def swatches(template=None):
155155
Agsunset,
156156
Brwnyl,
157157
)
158+
159+
# Prefix variable names with _ so that they will not be added to the swatches
160+
_contents = dict(globals())
161+
for _k, _cols in _contents.items():
162+
if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"):
163+
continue
164+
globals()[_k + "_r"] = _cols[::-1]

‎packages/python/plotly/_plotly_utils/tests/validators/test_colorscale_validator.py

Copy file name to clipboardExpand all lines: packages/python/plotly/_plotly_utils/tests/validators/test_colorscale_validator.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def validator():
2525
and len(c) == 2
2626
and isinstance(c[0], str)
2727
and isinstance(c[1], list)
28+
and not c[0].startswith("_")
2829
}
2930

3031

‎packages/python/plotly/plotly/graph_objs/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/__init__.py
+30-15Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2870,7 +2870,8 @@ def colorscale(self):
28702870
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
28712871
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
28722872
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
2873-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
2873+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
2874+
Appending '_r' to a named colorscale reverses it.
28742875

28752876
Returns
28762877
-------
@@ -10330,7 +10331,8 @@ def colorscale(self):
1033010331
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
1033110332
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
1033210333
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
10333-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
10334+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
10335+
Appending '_r' to a named colorscale reverses it.
1033410336

1033510337
Returns
1033610338
-------
@@ -14320,7 +14322,8 @@ def colorscale(self):
1432014322
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
1432114323
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
1432214324
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
14323-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
14325+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
14326+
Appending '_r' to a named colorscale reverses it.
1432414327

1432514328
Returns
1432614329
-------
@@ -46588,7 +46591,8 @@ def colorscale(self):
4658846591
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
4658946592
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
4659046593
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
46591-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
46594+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
46595+
Appending '_r' to a named colorscale reverses it.
4659246596

4659346597
Returns
4659446598
-------
@@ -49198,7 +49202,8 @@ def colorscale(self):
4919849202
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
4919949203
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
4920049204
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
49201-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
49205+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
49206+
Appending '_r' to a named colorscale reverses it.
4920249207

4920349208
Returns
4920449209
-------
@@ -53649,7 +53654,8 @@ def colorscale(self):
5364953654
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
5365053655
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
5365153656
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
53652-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
53657+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
53658+
Appending '_r' to a named colorscale reverses it.
5365353659

5365453660
Returns
5365553661
-------
@@ -56285,7 +56291,8 @@ def colorscale(self):
5628556291
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
5628656292
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
5628756293
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
56288-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
56294+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
56295+
Appending '_r' to a named colorscale reverses it.
5628956296

5629056297
Returns
5629156298
-------
@@ -61005,7 +61012,8 @@ def colorscale(self):
6100561012
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
6100661013
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
6100761014
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
61008-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
61015+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
61016+
Appending '_r' to a named colorscale reverses it.
6100961017

6101061018
Returns
6101161019
-------
@@ -62845,7 +62853,8 @@ def colorscale(self):
6284562853
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
6284662854
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
6284762855
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
62848-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
62856+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
62857+
Appending '_r' to a named colorscale reverses it.
6284962858

6285062859
Returns
6285162860
-------
@@ -69237,7 +69246,8 @@ def colorscale(self):
6923769246
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
6923869247
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
6923969248
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
69240-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
69249+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
69250+
Appending '_r' to a named colorscale reverses it.
6924169251

6924269252
Returns
6924369253
-------
@@ -71326,7 +71336,8 @@ def colorscale(self):
7132671336
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
7132771337
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
7132871338
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
71329-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
71339+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
71340+
Appending '_r' to a named colorscale reverses it.
7133071341

7133171342
Returns
7133271343
-------
@@ -73293,7 +73304,8 @@ def colorscale(self):
7329373304
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
7329473305
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
7329573306
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
73296-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
73307+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
73308+
Appending '_r' to a named colorscale reverses it.
7329773309

7329873310
Returns
7329973311
-------
@@ -75945,7 +75957,8 @@ def colorscale(self):
7594575957
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
7594675958
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
7594775959
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
75948-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
75960+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
75961+
Appending '_r' to a named colorscale reverses it.
7594975962

7595075963
Returns
7595175964
-------
@@ -78055,7 +78068,8 @@ def colorscale(self):
7805578068
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
7805678069
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
7805778070
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
78058-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
78071+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
78072+
Appending '_r' to a named colorscale reverses it.
7805978073

7806078074
Returns
7806178075
-------
@@ -79952,7 +79966,8 @@ def colorscale(self):
7995279966
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
7995379967
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
7995479968
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
79955-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
79969+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
79970+
Appending '_r' to a named colorscale reverses it.
7995679971

7995779972
Returns
7995879973
-------

‎packages/python/plotly/plotly/graph_objs/bar/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/bar/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,8 @@ def colorscale(self):
15691569
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
15701570
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
15711571
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
1572-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
1572+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
1573+
Appending '_r' to a named colorscale reverses it.
15731574
15741575
Returns
15751576
-------

‎packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def colorscale(self):
259259
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
260260
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
261261
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
262-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
262+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
263+
Appending '_r' to a named colorscale reverses it.
263264
264265
Returns
265266
-------

‎packages/python/plotly/plotly/graph_objs/barpolar/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/barpolar/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,8 @@ def colorscale(self):
929929
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
930930
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
931931
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
932-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
932+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
933+
Appending '_r' to a named colorscale reverses it.
933934
934935
Returns
935936
-------

‎packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def colorscale(self):
259259
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
260260
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
261261
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
262-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
262+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
263+
Appending '_r' to a named colorscale reverses it.
263264
264265
Returns
265266
-------

‎packages/python/plotly/plotly/graph_objs/funnel/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/funnel/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,8 @@ def colorscale(self):
12751275
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
12761276
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
12771277
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
1278-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
1278+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
1279+
Appending '_r' to a named colorscale reverses it.
12791280
12801281
Returns
12811282
-------

‎packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def colorscale(self):
259259
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
260260
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
261261
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
262-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
262+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
263+
Appending '_r' to a named colorscale reverses it.
263264
264265
Returns
265266
-------

‎packages/python/plotly/plotly/graph_objs/histogram/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/histogram/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,8 @@ def colorscale(self):
14131413
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
14141414
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
14151415
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
1416-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
1416+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
1417+
Appending '_r' to a named colorscale reverses it.
14171418
14181419
Returns
14191420
-------

‎packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def colorscale(self):
259259
'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral',
260260
'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose',
261261
'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight',
262-
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']
262+
'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'].
263+
Appending '_r' to a named colorscale reverses it.
263264
264265
Returns
265266
-------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.