You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
6
6
7
7
### Fixed
8
8
- Fixed another compatibility issue with Pandas 2.0, just affecting `px.*(line_close=True)`[[#4190](https://github.com/plotly/plotly.py/pull/4190)]
9
+
- Empty pandas dataframe with facet row/column set no longer fails [[#4038](https://github.com/plotly/plotly.py/pull/4038)]
9
10
- Added some rounding to the `make_subplots` function to handle situations where the user-input specs cause the domain to exceed 1 by small amounts [[#4153](https://github.com/plotly/plotly.py/pull/4153)]
10
11
- Sanitize JSON output to prevent an XSS vector when graphs are inserted directly into HTML [[#4196](https://github.com/plotly/plotly.py/pull/4196)]
12
+
- Fixed issue with shapes and annotations plotting on the wrong y axis when supplied with a specific axis in the `yref` parameter [[#4177](https://github.com/plotly/plotly.py/pull/4177)]
13
+
- Remove `use_2to3` setuptools arg, which is invalid in the latest Python and setuptools versions [[#4206](https://github.com/plotly/plotly.py/pull/4206)]
- Fixed issue with `colors.n_colors` where generated RGB color values were not being constrained to stay between 0 and 255 [[#4110](https://github.com/plotly/plotly.py/pull/4110)]
Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/basedatatypes.py
+37-14Lines changed: 37 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1559,17 +1559,31 @@ def _add_annotation_like(
1559
1559
subplot_type=refs[0].subplot_type,
1560
1560
)
1561
1561
)
1562
-
iflen(refs) ==1andsecondary_y:
1563
-
raiseValueError(
1564
-
"""
1565
-
Cannot add {prop_singular} to secondary y-axis of subplot at position ({r}, {c})
1566
-
because subplot does not have a secondary y-axis"""
1567
-
)
1568
-
ifsecondary_y:
1569
-
xaxis, yaxis=refs[1].layout_keys
1562
+
1563
+
# If the new_object was created with a yref specified that did not include paper or domain, the specified yref should be used otherwise assign the xref and yref from the layout_keys
1564
+
if (
1565
+
new_obj.yrefisNone
1566
+
ornew_obj.yref=="y"
1567
+
or"paper"innew_obj.yref
1568
+
or"domain"innew_obj.yref
1569
+
):
1570
+
iflen(refs) ==1andsecondary_y:
1571
+
raiseValueError(
1572
+
"""
1573
+
Cannot add {prop_singular} to secondary y-axis of subplot at position ({r}, {c})
1574
+
because subplot does not have a secondary y-axis""".format(
0 commit comments