From a6cb0c1e98c719eae260d44a15a290d62f4c9de3 Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Tue, 10 Jan 2023 20:20:10 -0500 Subject: [PATCH 1/5] minimal graft of array_ok to angle --- .../plotly/_plotly_utils/basevalidators.py | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/python/plotly/_plotly_utils/basevalidators.py b/packages/python/plotly/_plotly_utils/basevalidators.py index f68bc63f761..9aa614ad1aa 100644 --- a/packages/python/plotly/_plotly_utils/basevalidators.py +++ b/packages/python/plotly/_plotly_utils/basevalidators.py @@ -1660,15 +1660,17 @@ class AngleValidator(BaseValidator): "description": "A number (in degree) between -180 and 180.", "requiredOpts": [], "otherOpts": [ - "dflt" + "dflt", + "arrayOk" ] }, """ - def __init__(self, plotly_name, parent_name, **kwargs): + def __init__(self, plotly_name, parent_name, array_ok=False, **kwargs): super(AngleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, **kwargs ) + self.array_ok = array_ok def description(self): desc = """\ @@ -1686,6 +1688,20 @@ def validate_coerce(self, v): if v is None: # Pass None through pass + elif self.array_ok and is_homogeneous_array(v): + try: + v_array = copy_to_readonly_numpy_array(v, force_numeric=True) + except (ValueError, TypeError, OverflowError): + self.raise_invalid_val(v) + v = v_array # Always numeric numpy array + elif self.array_ok and is_simple_array(v): + # Check numeric + invalid_els = [e for e in v if not isinstance(e, numbers.Number)] + + if invalid_els: + self.raise_invalid_elements(invalid_els[:10]) + + v = to_scalar_or_list(v) elif not isinstance(v, numbers.Number): self.raise_invalid_val(v) else: From 6d9f4adb408c7621990fc8f461344e9f93b10eb9 Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Wed, 11 Jan 2023 09:37:36 -0500 Subject: [PATCH 2/5] normalize arrays of angles --- packages/python/plotly/_plotly_utils/basevalidators.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/python/plotly/_plotly_utils/basevalidators.py b/packages/python/plotly/_plotly_utils/basevalidators.py index 9aa614ad1aa..f0a3c9617c3 100644 --- a/packages/python/plotly/_plotly_utils/basevalidators.py +++ b/packages/python/plotly/_plotly_utils/basevalidators.py @@ -1694,6 +1694,8 @@ def validate_coerce(self, v): except (ValueError, TypeError, OverflowError): self.raise_invalid_val(v) v = v_array # Always numeric numpy array + # Normalize v onto the interval [-180, 180) + v = (v + 180) % 360 - 180 elif self.array_ok and is_simple_array(v): # Check numeric invalid_els = [e for e in v if not isinstance(e, numbers.Number)] @@ -1701,7 +1703,7 @@ def validate_coerce(self, v): if invalid_els: self.raise_invalid_elements(invalid_els[:10]) - v = to_scalar_or_list(v) + v = [(x + 180) % 360 - 180 for x in to_scalar_or_list(v)] elif not isinstance(v, numbers.Number): self.raise_invalid_val(v) else: From ac0be21e02e3824d38146925d33ef103cc431765 Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Wed, 11 Jan 2023 09:55:33 -0500 Subject: [PATCH 3/5] conditional docstring --- packages/python/plotly/_plotly_utils/basevalidators.py | 9 ++++++--- packages/python/plotly/plotly/graph_objs/_bar.py | 4 ++-- packages/python/plotly/plotly/graph_objs/_funnel.py | 4 ++-- packages/python/plotly/plotly/graph_objs/_histogram.py | 4 ++-- packages/python/plotly/plotly/graph_objs/_parcoords.py | 4 ++-- packages/python/plotly/plotly/graph_objs/_pie.py | 4 ++-- packages/python/plotly/plotly/graph_objs/_sunburst.py | 4 ++-- packages/python/plotly/plotly/graph_objs/_waterfall.py | 4 ++-- .../plotly/plotly/graph_objs/bar/marker/_colorbar.py | 4 ++-- .../plotly/graph_objs/barpolar/marker/_colorbar.py | 4 ++-- packages/python/plotly/plotly/graph_objs/box/_marker.py | 4 ++-- .../python/plotly/plotly/graph_objs/carpet/_aaxis.py | 4 ++-- .../python/plotly/plotly/graph_objs/carpet/_baxis.py | 4 ++-- .../plotly/plotly/graph_objs/choropleth/_colorbar.py | 4 ++-- .../plotly/graph_objs/choroplethmapbox/_colorbar.py | 4 ++-- .../python/plotly/plotly/graph_objs/cone/_colorbar.py | 4 ++-- .../python/plotly/plotly/graph_objs/contour/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/contourcarpet/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/densitymapbox/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/funnel/marker/_colorbar.py | 4 ++-- .../python/plotly/plotly/graph_objs/heatmap/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/heatmapgl/_colorbar.py | 4 ++-- .../plotly/graph_objs/histogram/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/histogram2d/_colorbar.py | 4 ++-- .../plotly/graph_objs/histogram2dcontour/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/icicle/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/indicator/gauge/_axis.py | 4 ++-- .../plotly/plotly/graph_objs/isosurface/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/layout/_annotation.py | 4 ++-- .../python/plotly/plotly/graph_objs/layout/_xaxis.py | 4 ++-- .../python/plotly/plotly/graph_objs/layout/_yaxis.py | 4 ++-- .../plotly/graph_objs/layout/coloraxis/_colorbar.py | 4 ++-- .../plotly/graph_objs/layout/polar/_angularaxis.py | 8 ++++---- .../plotly/plotly/graph_objs/layout/polar/_radialaxis.py | 8 ++++---- .../plotly/plotly/graph_objs/layout/scene/_annotation.py | 4 ++-- .../plotly/plotly/graph_objs/layout/scene/_xaxis.py | 4 ++-- .../plotly/plotly/graph_objs/layout/scene/_yaxis.py | 4 ++-- .../plotly/plotly/graph_objs/layout/scene/_zaxis.py | 4 ++-- .../plotly/plotly/graph_objs/layout/smith/_realaxis.py | 4 ++-- .../plotly/plotly/graph_objs/layout/ternary/_aaxis.py | 4 ++-- .../plotly/plotly/graph_objs/layout/ternary/_baxis.py | 4 ++-- .../plotly/plotly/graph_objs/layout/ternary/_caxis.py | 4 ++-- .../python/plotly/plotly/graph_objs/mesh3d/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/parcats/line/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/parcoords/line/_colorbar.py | 4 ++-- .../python/plotly/plotly/graph_objs/scatter/_marker.py | 4 ++-- .../plotly/plotly/graph_objs/scatter/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/scatter3d/line/_colorbar.py | 4 ++-- .../plotly/graph_objs/scatter3d/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/scattercarpet/_marker.py | 4 ++-- .../plotly/graph_objs/scattercarpet/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/scattergeo/_marker.py | 4 ++-- .../plotly/graph_objs/scattergeo/marker/_colorbar.py | 4 ++-- .../python/plotly/plotly/graph_objs/scattergl/_marker.py | 4 ++-- .../plotly/graph_objs/scattergl/marker/_colorbar.py | 4 ++-- .../plotly/graph_objs/scattermapbox/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/scatterpolar/_marker.py | 4 ++-- .../plotly/graph_objs/scatterpolar/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/scatterpolargl/_marker.py | 4 ++-- .../plotly/graph_objs/scatterpolargl/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/scattersmith/_marker.py | 4 ++-- .../plotly/graph_objs/scattersmith/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/scatterternary/_marker.py | 4 ++-- .../plotly/graph_objs/scatterternary/marker/_colorbar.py | 4 ++-- .../python/plotly/plotly/graph_objs/splom/_marker.py | 4 ++-- .../plotly/plotly/graph_objs/splom/marker/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/streamtube/_colorbar.py | 4 ++-- .../plotly/graph_objs/sunburst/marker/_colorbar.py | 4 ++-- .../python/plotly/plotly/graph_objs/surface/_colorbar.py | 4 ++-- .../plotly/plotly/graph_objs/treemap/marker/_colorbar.py | 4 ++-- .../python/plotly/plotly/graph_objs/violin/_marker.py | 4 ++-- .../python/plotly/plotly/graph_objs/volume/_colorbar.py | 4 ++-- 72 files changed, 152 insertions(+), 149 deletions(-) diff --git a/packages/python/plotly/_plotly_utils/basevalidators.py b/packages/python/plotly/_plotly_utils/basevalidators.py index f0a3c9617c3..2b799c474cb 100644 --- a/packages/python/plotly/_plotly_utils/basevalidators.py +++ b/packages/python/plotly/_plotly_utils/basevalidators.py @@ -1675,11 +1675,14 @@ def __init__(self, plotly_name, parent_name, array_ok=False, **kwargs): def description(self): desc = """\ The '{plotly_name}' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180{array_ok}. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). """.format( - plotly_name=self.plotly_name + plotly_name=self.plotly_name, + array_ok=", or a list, numpy array or other iterable thereof" + if self.array_ok + else "", ) return desc diff --git a/packages/python/plotly/plotly/graph_objs/_bar.py b/packages/python/plotly/plotly/graph_objs/_bar.py index 0d4ac35d0d0..2f8561ff52b 100644 --- a/packages/python/plotly/plotly/graph_objs/_bar.py +++ b/packages/python/plotly/plotly/graph_objs/_bar.py @@ -1374,8 +1374,8 @@ def textangle(self): the maximum size in bars. The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/_funnel.py b/packages/python/plotly/plotly/graph_objs/_funnel.py index 97959ac4172..d8aab9b1aeb 100644 --- a/packages/python/plotly/plotly/graph_objs/_funnel.py +++ b/packages/python/plotly/plotly/graph_objs/_funnel.py @@ -1150,8 +1150,8 @@ def textangle(self): the maximum size in bars. The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/_histogram.py b/packages/python/plotly/plotly/graph_objs/_histogram.py index 469c834ca06..0507ea0f72e 100644 --- a/packages/python/plotly/plotly/graph_objs/_histogram.py +++ b/packages/python/plotly/plotly/graph_objs/_histogram.py @@ -1450,8 +1450,8 @@ def textangle(self): the maximum size in bars. The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/_parcoords.py b/packages/python/plotly/plotly/graph_objs/_parcoords.py index 77bab195fa9..0f6d2a290c9 100644 --- a/packages/python/plotly/plotly/graph_objs/_parcoords.py +++ b/packages/python/plotly/plotly/graph_objs/_parcoords.py @@ -302,8 +302,8 @@ def labelangle(self): margins when `labelposition` is set to "bottom". The 'labelangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/_pie.py b/packages/python/plotly/plotly/graph_objs/_pie.py index eb575b30b2c..f42621f652c 100644 --- a/packages/python/plotly/plotly/graph_objs/_pie.py +++ b/packages/python/plotly/plotly/graph_objs/_pie.py @@ -970,8 +970,8 @@ def rotation(self): some other angle. The 'rotation' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/_sunburst.py b/packages/python/plotly/plotly/graph_objs/_sunburst.py index 7d3ea4fca6f..e0a6e980c0b 100644 --- a/packages/python/plotly/plotly/graph_objs/_sunburst.py +++ b/packages/python/plotly/plotly/graph_objs/_sunburst.py @@ -1065,8 +1065,8 @@ def rotation(self): default the first slice starts at 3 o'clock. The 'rotation' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/_waterfall.py b/packages/python/plotly/plotly/graph_objs/_waterfall.py index edd41de9090..0e1742f8a12 100644 --- a/packages/python/plotly/plotly/graph_objs/_waterfall.py +++ b/packages/python/plotly/plotly/graph_objs/_waterfall.py @@ -1173,8 +1173,8 @@ def textangle(self): the maximum size in bars. The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/bar/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/bar/marker/_colorbar.py index 946d9609d11..f508c9b3c48 100644 --- a/packages/python/plotly/plotly/graph_objs/bar/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/bar/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/barpolar/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/barpolar/marker/_colorbar.py index 069aebca5b8..68df6be2be3 100644 --- a/packages/python/plotly/plotly/graph_objs/barpolar/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/barpolar/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/box/_marker.py b/packages/python/plotly/plotly/graph_objs/box/_marker.py index 6863d1c9a1b..1ff502a66d6 100644 --- a/packages/python/plotly/plotly/graph_objs/box/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/box/_marker.py @@ -26,8 +26,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py b/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py index 41bb446450c..d3c83a7baf4 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/_aaxis.py @@ -1253,8 +1253,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py b/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py index f5387413497..fa382d44fd8 100644 --- a/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py +++ b/packages/python/plotly/plotly/graph_objs/carpet/_baxis.py @@ -1253,8 +1253,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/choropleth/_colorbar.py b/packages/python/plotly/plotly/graph_objs/choropleth/_colorbar.py index 5229ad2d83a..822e77cdc7d 100644 --- a/packages/python/plotly/plotly/graph_objs/choropleth/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/choropleth/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_colorbar.py b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_colorbar.py index a307fe3ab7e..78a94a03618 100644 --- a/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/choroplethmapbox/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/cone/_colorbar.py b/packages/python/plotly/plotly/graph_objs/cone/_colorbar.py index 4dc71ef4ca4..3ac90cfed9e 100644 --- a/packages/python/plotly/plotly/graph_objs/cone/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/cone/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/contour/_colorbar.py b/packages/python/plotly/plotly/graph_objs/contour/_colorbar.py index 5c0f60b77e6..65af3d71d9c 100644 --- a/packages/python/plotly/plotly/graph_objs/contour/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/contour/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/contourcarpet/_colorbar.py b/packages/python/plotly/plotly/graph_objs/contourcarpet/_colorbar.py index 2bdc6681650..6980d6825c7 100644 --- a/packages/python/plotly/plotly/graph_objs/contourcarpet/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/contourcarpet/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/densitymapbox/_colorbar.py b/packages/python/plotly/plotly/graph_objs/densitymapbox/_colorbar.py index 8ae29a1d889..8078bdfb1dd 100644 --- a/packages/python/plotly/plotly/graph_objs/densitymapbox/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/densitymapbox/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/funnel/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/funnel/marker/_colorbar.py index 43dcd60611d..82f99e3487a 100644 --- a/packages/python/plotly/plotly/graph_objs/funnel/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/funnel/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/heatmap/_colorbar.py b/packages/python/plotly/plotly/graph_objs/heatmap/_colorbar.py index 36b82d234ea..0ea40eabf4d 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmap/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/heatmap/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/heatmapgl/_colorbar.py b/packages/python/plotly/plotly/graph_objs/heatmapgl/_colorbar.py index 0c8940af2df..7ccf32de07d 100644 --- a/packages/python/plotly/plotly/graph_objs/heatmapgl/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/heatmapgl/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/histogram/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/histogram/marker/_colorbar.py index ff43ae000a2..61546f6e62d 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/histogram/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/histogram2d/_colorbar.py b/packages/python/plotly/plotly/graph_objs/histogram2d/_colorbar.py index 4ceb3fb215a..09ce3359fed 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2d/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2d/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_colorbar.py b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_colorbar.py index dd1b225226f..07fe4c682ce 100644 --- a/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/histogram2dcontour/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/icicle/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/icicle/marker/_colorbar.py index 1c19cee72eb..724a3769aa6 100644 --- a/packages/python/plotly/plotly/graph_objs/icicle/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/icicle/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/indicator/gauge/_axis.py b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_axis.py index b00b978655b..bdc356482b7 100644 --- a/packages/python/plotly/plotly/graph_objs/indicator/gauge/_axis.py +++ b/packages/python/plotly/plotly/graph_objs/indicator/gauge/_axis.py @@ -319,8 +319,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py b/packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py index 7a7bd6943c2..f6f372a8df0 100644 --- a/packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/isosurface/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/_annotation.py b/packages/python/plotly/plotly/graph_objs/layout/_annotation.py index bc9138ccfb1..f7053f71404 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/_annotation.py +++ b/packages/python/plotly/plotly/graph_objs/layout/_annotation.py @@ -918,8 +918,8 @@ def textangle(self): horizontal. The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py b/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py index db1ea530c7e..b18f594d25f 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/_xaxis.py @@ -1859,8 +1859,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py b/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py index 6e982a4dd84..b588709584b 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/_yaxis.py @@ -1782,8 +1782,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/_colorbar.py b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/_colorbar.py index dbd5b766052..cfaf3a1ce6c 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/coloraxis/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/layout/coloraxis/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py b/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py index 9e884a801d6..58f67348282 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/_angularaxis.py @@ -631,8 +631,8 @@ def rotation(self): corresponds to due North (like on a compass), The 'rotation' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns @@ -854,8 +854,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py b/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py index e6bad1d40c9..51b7a8a7b31 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/polar/_radialaxis.py @@ -75,8 +75,8 @@ def angle(self): angle. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns @@ -920,8 +920,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_annotation.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_annotation.py index 48644c8c3e1..6327110eff3 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/_annotation.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_annotation.py @@ -790,8 +790,8 @@ def textangle(self): horizontal. The 'textangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_xaxis.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_xaxis.py index 917b68b3144..071eb7242ef 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/_xaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_xaxis.py @@ -1071,8 +1071,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_yaxis.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_yaxis.py index 8cb133c47ce..62b9fb8ce98 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/_yaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_yaxis.py @@ -1071,8 +1071,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/scene/_zaxis.py b/packages/python/plotly/plotly/graph_objs/layout/scene/_zaxis.py index bba55cafe60..8642a4370be 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/scene/_zaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/scene/_zaxis.py @@ -1071,8 +1071,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/smith/_realaxis.py b/packages/python/plotly/plotly/graph_objs/layout/smith/_realaxis.py index dda9cc6c7f2..69c4494d339 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/smith/_realaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/smith/_realaxis.py @@ -477,8 +477,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py index 14581357645..32e4c5d2a43 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_aaxis.py @@ -671,8 +671,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py index 71cadbd49c5..bca27033b48 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_baxis.py @@ -671,8 +671,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py b/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py index d8ea08782ab..04f33b4fc36 100644 --- a/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py +++ b/packages/python/plotly/plotly/graph_objs/layout/ternary/_caxis.py @@ -671,8 +671,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/mesh3d/_colorbar.py b/packages/python/plotly/plotly/graph_objs/mesh3d/_colorbar.py index 8846e8bbe1f..cd623b9f1d9 100644 --- a/packages/python/plotly/plotly/graph_objs/mesh3d/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/mesh3d/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/parcats/line/_colorbar.py b/packages/python/plotly/plotly/graph_objs/parcats/line/_colorbar.py index e0ca99aabe9..bc96dd93b1a 100644 --- a/packages/python/plotly/plotly/graph_objs/parcats/line/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/parcats/line/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/parcoords/line/_colorbar.py b/packages/python/plotly/plotly/graph_objs/parcoords/line/_colorbar.py index a8b66c22f72..d027f026406 100644 --- a/packages/python/plotly/plotly/graph_objs/parcoords/line/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/parcoords/line/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatter/_marker.py b/packages/python/plotly/plotly/graph_objs/scatter/_marker.py index 4b6d6df29dc..8c6200f7310 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/_marker.py @@ -48,8 +48,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py index c46296f9b55..0a5038b5a3b 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/line/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatter3d/line/_colorbar.py index a7e6cc84d5f..8eada893056 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/line/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/line/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_colorbar.py index 2cc1360a4f0..2a772e00c64 100644 --- a/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scatter3d/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/_marker.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/_marker.py index 9113bccf913..37ef24b5424 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/_marker.py @@ -48,8 +48,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_colorbar.py index 6d1a3e95126..82d0f326d71 100644 --- a/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scattercarpet/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/_marker.py b/packages/python/plotly/plotly/graph_objs/scattergeo/_marker.py index 9f9f068c4d1..0278a5bfbbb 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/_marker.py @@ -47,8 +47,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_colorbar.py index d0c7804b119..c144b487f43 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scattergeo/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/_marker.py b/packages/python/plotly/plotly/graph_objs/scattergl/_marker.py index e41cfec8005..55b818e1ea2 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/_marker.py @@ -43,8 +43,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattergl/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattergl/marker/_colorbar.py index f1ea940ff6d..92f4e82f8db 100644 --- a/packages/python/plotly/plotly/graph_objs/scattergl/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scattergl/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/_colorbar.py index da2e50bad5f..f3860a8fdc0 100644 --- a/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scattermapbox/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/_marker.py index ac178cd1d74..0989b11f39e 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/_marker.py @@ -48,8 +48,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_colorbar.py index 40710aa08f8..8db43368482 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolar/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_marker.py index 11f7719c70d..1508ddc96e1 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/_marker.py @@ -43,8 +43,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_colorbar.py index fb1999b79a1..6757e7b3eaf 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scatterpolargl/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattersmith/_marker.py b/packages/python/plotly/plotly/graph_objs/scattersmith/_marker.py index 952517ed666..501577e6aef 100644 --- a/packages/python/plotly/plotly/graph_objs/scattersmith/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/scattersmith/_marker.py @@ -48,8 +48,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scattersmith/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scattersmith/marker/_colorbar.py index c726d9b592b..8aba16aecac 100644 --- a/packages/python/plotly/plotly/graph_objs/scattersmith/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scattersmith/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/_marker.py b/packages/python/plotly/plotly/graph_objs/scatterternary/_marker.py index 48a553df0d1..5b490e0f938 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/_marker.py @@ -48,8 +48,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_colorbar.py index bd371b3f6e1..d0d8f4a2637 100644 --- a/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/scatterternary/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/splom/_marker.py b/packages/python/plotly/plotly/graph_objs/splom/_marker.py index 993aa5f3bca..99d3c9edab8 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/splom/_marker.py @@ -43,8 +43,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180, or a list, numpy array or other iterable thereof. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/splom/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/splom/marker/_colorbar.py index a9f1b4b52c4..f0e8f72a152 100644 --- a/packages/python/plotly/plotly/graph_objs/splom/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/splom/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/streamtube/_colorbar.py b/packages/python/plotly/plotly/graph_objs/streamtube/_colorbar.py index c23482de08c..20749a36c89 100644 --- a/packages/python/plotly/plotly/graph_objs/streamtube/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/streamtube/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/sunburst/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/sunburst/marker/_colorbar.py index 7bbc57a2f86..0373dd9afa3 100644 --- a/packages/python/plotly/plotly/graph_objs/sunburst/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/sunburst/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/surface/_colorbar.py b/packages/python/plotly/plotly/graph_objs/surface/_colorbar.py index 6b3e3744c1c..5d2bed7d27e 100644 --- a/packages/python/plotly/plotly/graph_objs/surface/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/surface/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/treemap/marker/_colorbar.py b/packages/python/plotly/plotly/graph_objs/treemap/marker/_colorbar.py index d6e14c6d160..2daf9d950e7 100644 --- a/packages/python/plotly/plotly/graph_objs/treemap/marker/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/treemap/marker/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/violin/_marker.py b/packages/python/plotly/plotly/graph_objs/violin/_marker.py index 666261b2cda..6cc91d17846 100644 --- a/packages/python/plotly/plotly/graph_objs/violin/_marker.py +++ b/packages/python/plotly/plotly/graph_objs/violin/_marker.py @@ -26,8 +26,8 @@ def angle(self): Sets the marker angle in respect to `angleref`. The 'angle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns diff --git a/packages/python/plotly/plotly/graph_objs/volume/_colorbar.py b/packages/python/plotly/plotly/graph_objs/volume/_colorbar.py index e02d0640527..a73eb8b012c 100644 --- a/packages/python/plotly/plotly/graph_objs/volume/_colorbar.py +++ b/packages/python/plotly/plotly/graph_objs/volume/_colorbar.py @@ -640,8 +640,8 @@ def tickangle(self): labels vertically. The 'tickangle' property is a angle (in degrees) that may be - specified as a number between -180 and 180. Numeric values outside this - range are converted to the equivalent value + specified as a number between -180 and 180. + Numeric values outside this range are converted to the equivalent value (e.g. 270 is converted to -90). Returns From 8986034c7cd82364c204431763a047011c293b2d Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Wed, 11 Jan 2023 09:56:22 -0500 Subject: [PATCH 4/5] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 145389a2419..47633453384 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Fixed the usage of some deprecated NumPy types which were removed in NumPy 1.24 [[#3997](https://github.com/plotly/plotly.py/pull/3997)] - Fixed bug for trendlines with datetime axes [[#3683](https://github.com/plotly/plotly.py/issues/3683)] + - `marker.angle` attribute now accepts iterables where appropriate [[#4013](https://github.com/plotly/plotly.py/issues/4013)] ## [5.11.0] - 2022-10-27 From 6660820a45dcf194e044266a515233483cebf233 Mon Sep 17 00:00:00 2001 From: Nicolas Kruchten Date: Wed, 11 Jan 2023 14:34:51 -0500 Subject: [PATCH 5/5] angle aok tests --- .../tests/validators/test_angle_validator.py | 38 ++++++++++++++++++- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/packages/python/plotly/_plotly_utils/tests/validators/test_angle_validator.py b/packages/python/plotly/_plotly_utils/tests/validators/test_angle_validator.py index 1790e569d6a..959083adeaf 100644 --- a/packages/python/plotly/_plotly_utils/tests/validators/test_angle_validator.py +++ b/packages/python/plotly/_plotly_utils/tests/validators/test_angle_validator.py @@ -7,11 +7,16 @@ # Fixtures # -------- -@pytest.fixture() -def validator(): +@pytest.fixture +def validator(request): return AngleValidator("prop", "parent") +@pytest.fixture +def validator_aok(request): + return AngleValidator("prop", "parent", array_ok=True) + + # Tests # ----- # ### Test acceptance ### @@ -36,3 +41,32 @@ def test_rejection(val, validator): validator.validate_coerce(val) assert "Invalid value" in str(validation_failure.value) + + +# ### Test acceptance ### +@pytest.mark.parametrize("val", [[0, 179, -179]]) +def test_aok_acceptance(val, validator_aok): + assert validator_aok.validate_coerce(val) == val + assert validator_aok.validate_coerce(tuple(val)) == val + assert np.array_equal(validator_aok.validate_coerce(np.array(val)), np.array(val)) + + +# ### Test coercion above 180 ### +@pytest.mark.parametrize( + "val,expected", + [(180, -180), (181, -179), (-180.25, 179.75), (540, -180), (-541, 179)], +) +def test_aok_coercion(val, expected, validator_aok): + assert validator_aok.validate_coerce([val]) == [expected] + assert np.array_equal( + validator_aok.validate_coerce(np.array([val])), np.array([expected]) + ) + + +# ### Test rejection ### +@pytest.mark.parametrize("val", [["hello"], [()], [[]], [set()], ["34"]]) +def test_aok_rejection(val, validator_aok): + with pytest.raises(ValueError) as validation_failure: + validator_aok.validate_coerce(val) + + assert "Invalid element(s)" in str(validation_failure.value)