diff --git a/packages/python/plotly/_plotly_utils/basevalidators.py b/packages/python/plotly/_plotly_utils/basevalidators.py index 8b91528b45..9bdf86adce 100644 --- a/packages/python/plotly/_plotly_utils/basevalidators.py +++ b/packages/python/plotly/_plotly_utils/basevalidators.py @@ -1532,6 +1532,8 @@ def named_colorscales(self): and len(c) == 2 and isinstance(c[0], str) and isinstance(c[1], list) + and not c[0].endswith("_r") + and not c[0].startswith("_") } return self._named_colorscales @@ -1558,7 +1560,8 @@ def description(self): and the second item is a valid color string. (e.g. [[0, 'green'], [0.5, 'red'], [1.0, 'rgb(0, 0, 255)']]) - One of the following named colorscales: -{colorscales_str} +{colorscales_str}. + Appending '_r' to a named colorscale reverses it. """.format( plotly_name=self.plotly_name, colorscales_str=colorscales_str ) @@ -1575,13 +1578,16 @@ def validate_coerce(self, v): if v_lower in self.named_colorscales: # Convert to color list v = self.named_colorscales[v_lower] - + v_valid = True + elif v_lower.endswith("_r") and v_lower[:-2] in self.named_colorscales: + v = self.named_colorscales[v_lower[:-2]][::-1] + v_valid = True + # + if v_valid: # Convert to list of lists colorscale d = len(v) - 1 v = [[(1.0 * i) / (1.0 * d), x] for i, x in enumerate(v)] - v_valid = True - elif is_array(v) and len(v) > 0: # If firset element is a string, treat as colorsequence if isinstance(v[0], string_types): diff --git a/packages/python/plotly/_plotly_utils/colors/_swatches.py b/packages/python/plotly/_plotly_utils/colors/_swatches.py index 9609249036..a8c776a346 100644 --- a/packages/python/plotly/_plotly_utils/colors/_swatches.py +++ b/packages/python/plotly/_plotly_utils/colors/_swatches.py @@ -20,7 +20,7 @@ def _swatches(module_names, module_contents, template=None): sequences = [ (k, v) for k, v in module_contents.items() - if not (k.startswith("_") or k == "swatches") + if not (k.startswith("_") or k == "swatches" or k.endswith("_r")) ] return go.Figure( diff --git a/packages/python/plotly/_plotly_utils/colors/carto.py b/packages/python/plotly/_plotly_utils/colors/carto.py index 94b3785d5e..353579c9a7 100644 --- a/packages/python/plotly/_plotly_utils/colors/carto.py +++ b/packages/python/plotly/_plotly_utils/colors/carto.py @@ -382,3 +382,10 @@ def swatches(template=None): "rgb(237, 100, 90)", "rgb(165, 170, 153)", ] + +# Prefix variable names with _ so that they will not be added to the swatches +_contents = dict(globals()) +for _k, _cols in _contents.items(): + if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"): + continue + globals()[_k + "_r"] = _cols[::-1] diff --git a/packages/python/plotly/_plotly_utils/colors/cmocean.py b/packages/python/plotly/_plotly_utils/colors/cmocean.py index 029e420442..14734fc46b 100644 --- a/packages/python/plotly/_plotly_utils/colors/cmocean.py +++ b/packages/python/plotly/_plotly_utils/colors/cmocean.py @@ -267,3 +267,10 @@ def swatches(template=None): "rgb(111, 23, 91)", "rgb(51, 13, 53)", ] + +# Prefix variable names with _ so that they will not be added to the swatches +_contents = dict(globals()) +for _k, _cols in _contents.items(): + if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"): + continue + globals()[_k + "_r"] = _cols[::-1] diff --git a/packages/python/plotly/_plotly_utils/colors/colorbrewer.py b/packages/python/plotly/_plotly_utils/colors/colorbrewer.py index b21015ec61..2b1714bf0f 100644 --- a/packages/python/plotly/_plotly_utils/colors/colorbrewer.py +++ b/packages/python/plotly/_plotly_utils/colors/colorbrewer.py @@ -456,3 +456,10 @@ def swatches(template=None): "rgb(189,0,38)", "rgb(128,0,38)", ] + +# Prefix variable names with _ so that they will not be added to the swatches +_contents = dict(globals()) +for _k, _cols in _contents.items(): + if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"): + continue + globals()[_k + "_r"] = _cols[::-1] diff --git a/packages/python/plotly/_plotly_utils/colors/cyclical.py b/packages/python/plotly/_plotly_utils/colors/cyclical.py index 235aee95fe..254fa83081 100644 --- a/packages/python/plotly/_plotly_utils/colors/cyclical.py +++ b/packages/python/plotly/_plotly_utils/colors/cyclical.py @@ -125,3 +125,10 @@ def swatches(template=None): "#9139fa", "#c543fa", ] + +# Prefix variable names with _ so that they will not be added to the swatches +_contents = dict(globals()) +for _k, _cols in _contents.items(): + if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"): + continue + globals()[_k + "_r"] = _cols[::-1] diff --git a/packages/python/plotly/_plotly_utils/colors/diverging.py b/packages/python/plotly/_plotly_utils/colors/diverging.py index eb6ca140da..3b4304e74d 100644 --- a/packages/python/plotly/_plotly_utils/colors/diverging.py +++ b/packages/python/plotly/_plotly_utils/colors/diverging.py @@ -30,3 +30,10 @@ def swatches(template=None): swatches.__doc__ = _swatches.__doc__ + +# Prefix variable names with _ so that they will not be added to the swatches +_contents = dict(globals()) +for _k, _cols in _contents.items(): + if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"): + continue + globals()[_k + "_r"] = _cols[::-1] diff --git a/packages/python/plotly/_plotly_utils/colors/plotlyjs.py b/packages/python/plotly/_plotly_utils/colors/plotlyjs.py index b6b2a794a2..feb2cc9965 100644 --- a/packages/python/plotly/_plotly_utils/colors/plotlyjs.py +++ b/packages/python/plotly/_plotly_utils/colors/plotlyjs.py @@ -179,3 +179,10 @@ scale_name=scale_name, scale_sequence=scale_sequence ) ) + +# Prefix variable names with _ so that they will not be added to the swatches +_contents = dict(globals()) +for _k, _cols in _contents.items(): + if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"): + continue + globals()[_k + "_r"] = _cols[::-1] diff --git a/packages/python/plotly/_plotly_utils/colors/qualitative.py b/packages/python/plotly/_plotly_utils/colors/qualitative.py index 41fa555ed1..fbc4aa6f03 100644 --- a/packages/python/plotly/_plotly_utils/colors/qualitative.py +++ b/packages/python/plotly/_plotly_utils/colors/qualitative.py @@ -145,3 +145,10 @@ def swatches(template=None): from .colorbrewer import Set1, Pastel1, Dark2, Set2, Pastel2, Set3 # noqa: F401 from .carto import Antique, Bold, Pastel, Prism, Safe, Vivid # noqa: F401 + +# Prefix variable names with _ so that they will not be added to the swatches +_contents = dict(globals()) +for _k, _cols in _contents.items(): + if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"): + continue + globals()[_k + "_r"] = _cols[::-1] diff --git a/packages/python/plotly/_plotly_utils/colors/sequential.py b/packages/python/plotly/_plotly_utils/colors/sequential.py index 42fea40cd2..0d0a4e5777 100644 --- a/packages/python/plotly/_plotly_utils/colors/sequential.py +++ b/packages/python/plotly/_plotly_utils/colors/sequential.py @@ -155,3 +155,10 @@ def swatches(template=None): Agsunset, Brwnyl, ) + +# Prefix variable names with _ so that they will not be added to the swatches +_contents = dict(globals()) +for _k, _cols in _contents.items(): + if _k.startswith("_") or _k == "swatches" or _k.endswith("_r"): + continue + globals()[_k + "_r"] = _cols[::-1] diff --git a/packages/python/plotly/_plotly_utils/tests/validators/test_colorscale_validator.py b/packages/python/plotly/_plotly_utils/tests/validators/test_colorscale_validator.py index c731ed1950..a40af5a184 100644 --- a/packages/python/plotly/_plotly_utils/tests/validators/test_colorscale_validator.py +++ b/packages/python/plotly/_plotly_utils/tests/validators/test_colorscale_validator.py @@ -25,6 +25,7 @@ def validator(): and len(c) == 2 and isinstance(c[0], str) and isinstance(c[1], list) + and not c[0].startswith("_") } diff --git a/packages/python/plotly/plotly/graph_objs/__init__.py b/packages/python/plotly/plotly/graph_objs/__init__.py index 650892a0ea..4275031e96 100644 --- a/packages/python/plotly/plotly/graph_objs/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/__init__.py @@ -2870,7 +2870,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -10330,7 +10331,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -14320,7 +14322,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -46588,7 +46591,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -49198,7 +49202,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -53649,7 +53654,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -56285,7 +56291,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -61005,7 +61012,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -62845,7 +62853,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -69237,7 +69246,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -71326,7 +71336,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -73293,7 +73304,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -75945,7 +75957,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -78055,7 +78068,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -79952,7 +79966,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/bar/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/__init__.py index 14c3b05aae..6cbb79d97f 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/__init__.py @@ -1569,7 +1569,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py index af48451870..20d2cdd96f 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py index d6943eb2da..53aacfc76e 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/__init__.py @@ -929,7 +929,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py index 4973fc6fa3..56d9169f0a 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/funnel/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/__init__.py index 5356b635de..ed2e1dc2c6 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/__init__.py @@ -1275,7 +1275,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py index 9332920020..5fe7171aae 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/histogram/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/__init__.py index 4c27cc1071..547c4e99d1 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/__init__.py @@ -1413,7 +1413,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py index 8b3c97b2ce..be459e0511 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/layout/__init__.py b/packages/python/plotly/plotly/graph_objs/layout/__init__.py index d5f450c3ef..fa97522128 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/layout/__init__.py @@ -19725,7 +19725,8 @@ def diverging(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -19769,7 +19770,8 @@ def sequential(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -19813,7 +19815,8 @@ def sequentialminus(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -20324,7 +20327,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/parcats/__init__.py b/packages/python/plotly/plotly/graph_objs/parcats/__init__.py index b91e579651..a5e3cb9ab9 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/__init__.py @@ -859,7 +859,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py b/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py index bceeb77e85..ab37e23b8e 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/__init__.py @@ -1086,7 +1086,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py b/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py index 4316113220..3581950ea3 100644 --- a/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sankey/link/__init__.py @@ -786,7 +786,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatter/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/__init__.py index 5fb3597465..b1548593de 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/__init__.py @@ -1254,7 +1254,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py index 2f8f8d3ff8..0a01583a3e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py index 58166e0095..e1195631b6 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/__init__.py @@ -1121,7 +1121,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- @@ -2341,7 +2342,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py index e451f81b69..3298a9bc70 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py index 16c1edcf21..f412ff5fce 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/__init__.py @@ -1256,7 +1256,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py index b868f0d108..34caaadd13 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py index 144459fa03..c5c8e729ec 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/__init__.py @@ -1255,7 +1255,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py index 85ef103769..37436fd355 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py index f5630a8f97..c1c7100789 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/__init__.py @@ -1255,7 +1255,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py index 3ed8801f14..ef5524e8d3 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py index 8a13436ff9..9609f38808 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/__init__.py @@ -1093,7 +1093,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py index 23071945fb..4be815f710 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/__init__.py @@ -1256,7 +1256,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py index 84fd736cfb..33e41b44f2 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py index cc0b9b150a..bda59de706 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/__init__.py @@ -1258,7 +1258,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py index 2c43cefef6..81ba00afda 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py index 0eb9c57e88..422f97741f 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/__init__.py @@ -1258,7 +1258,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py index fc5e8f7a0b..9063d06876 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/splom/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/__init__.py index 38e7122d08..099ff60167 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/__init__.py @@ -862,7 +862,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py b/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py index 00a4c2aebd..db78da6c5a 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/__init__.py @@ -259,7 +259,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py b/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py index 48cd93e467..35c5babb3b 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/__init__.py @@ -1230,7 +1230,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/graph_objs/treemap/__init__.py b/packages/python/plotly/plotly/graph_objs/treemap/__init__.py index f705371ad4..7bb16f7662 100644 --- a/packages/python/plotly/plotly/graph_objs/treemap/__init__.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/__init__.py @@ -1729,7 +1729,8 @@ def colorscale(self): 'rdpu', 'rdylbu', 'rdylgn', 'redor', 'reds', 'solar', 'spectral', 'speed', 'sunset', 'sunsetdark', 'teal', 'tealgrn', 'tealrose', 'tempo', 'temps', 'thermal', 'tropic', 'turbid', 'twilight', - 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd'] + 'viridis', 'ylgn', 'ylgnbu', 'ylorbr', 'ylorrd']. + Appending '_r' to a named colorscale reverses it. Returns ------- diff --git a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_properties_validated.py b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_properties_validated.py index cb6ef46ab6..e31d1dad09 100644 --- a/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_properties_validated.py +++ b/packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_properties_validated.py @@ -104,6 +104,15 @@ def test_present_colorscale(self): # Presented as tuple of tuples self.assertEqual(self.scatter.marker.colorscale, ((0, "red"), (1, "green"))) + # Test colorscale and reversed version + self.scatter.marker.colorscale = "viridis" + colorscale = self.scatter.to_plotly_json()["marker"]["colorscale"] + colorscale = [col[1] for col in colorscale] + self.scatter.marker.colorscale = "viridis_r" + colorscale_r = self.scatter.to_plotly_json()["marker"]["colorscale"] + colorscale_r = [col[1] for col in colorscale_r] + self.assertEqual(colorscale[::-1], colorscale_r) + class TestPropertyIterContains(TestCase): def setUp(self): diff --git a/packages/python/plotly/plotly/tests/test_core/test_px/test_colors.py b/packages/python/plotly/plotly/tests/test_core/test_px/test_colors.py new file mode 100644 index 0000000000..5ca41f9311 --- /dev/null +++ b/packages/python/plotly/plotly/tests/test_core/test_px/test_colors.py @@ -0,0 +1,27 @@ +import plotly.express as px +import numpy as np + + +def test_reversed_colorscale(): + fig1 = px.scatter( + x=[1, 2], y=[2, 3], color=[3, 4], color_continuous_scale="plasma_r" + ) + fig2 = px.scatter(x=[1, 2], y=[2, 3], color=[3, 4], color_continuous_scale="plasma") + colors1 = [val[1] for val in fig1.layout.coloraxis.colorscale] + colors2 = [val[1] for val in fig2.layout.coloraxis.colorscale] + assert colors1 == colors2[::-1] + fig1 = px.scatter( + x=[1, 2], + y=[2, 3], + color=[3, 4], + color_continuous_scale=px.colors.sequential.Plasma, + ) + fig2 = px.scatter( + x=[1, 2], + y=[2, 3], + color=[3, 4], + color_continuous_scale=px.colors.sequential.Plasma_r, + ) + colors1 = [val[1] for val in fig1.layout.coloraxis.colorscale] + colors2 = [val[1] for val in fig2.layout.coloraxis.colorscale] + assert colors1 == colors2[::-1]