File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/python/plotly/plotly Expand file tree Collapse file tree 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(
40604060 ):
40614061 # this was called intending to add to a single plot (and
40624062 # 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
40654065 # (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" )
40674070 new_layout_objs = tuple (
40684071 filter (
40694072 lambda x : x is not None ,
You can’t perform that action at this time.
0 commit comments