File tree 1 file changed +6
-3
lines changed
packages/python/plotly/plotly
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4060,10 +4060,13 @@ def _process_multiple_axis_spanning_shapes(
4060
4060
):
4061
4061
# this was called intending to add to a single plot (and
4062
4062
# self.add_{layout_obj} succeeded)
4063
- # however, in the case of a single plot, xref and yref are not
4064
- # specified, so we specify them here so the following routines can work
4063
+ # however, in the case of a single plot, xref and yref MAY not be
4064
+ # specified, IF they are not specified we specify them here so the following routines can work
4065
4065
# (they need to append " domain" to xref or yref)
4066
- self .layout [layout_obj ][- 1 ].update (xref = "x" , yref = "y" )
4066
+ if self .layout [layout_obj ][- 1 ].xref is None :
4067
+ self .layout [layout_obj ][- 1 ].update (xref = "x" )
4068
+ if self .layout [layout_obj ][- 1 ].yref is None :
4069
+ self .layout [layout_obj ][- 1 ].update (yref = "y" )
4067
4070
new_layout_objs = tuple (
4068
4071
filter (
4069
4072
lambda x : x is not None ,
You can’t perform that action at this time.
0 commit comments