Skip to content

Commit f472458

Browse files
add_vline and the like work on single plots made without make_subplots
1 parent 40dea30 commit f472458

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/python/plotly/plotly/basedatatypes.py

+3
Original file line numberDiff line numberDiff line change
@@ -3507,6 +3507,9 @@ def _make_paper_spanning_shape(self, direction, shape):
35073507
axis_num = shape[ref].strip(axis)
35083508
axis_layout_key = axis_layout_key_template % (axis_num,)
35093509
domain = self.layout[axis_layout_key]["domain"]
3510+
if domain is None:
3511+
# This could occur if the plot was not made with make_subplots
3512+
domain = [0, 1]
35103513
try:
35113514
shape[axis + "0"], shape[axis + "1"] = domain
35123515
except KeyError as e:

0 commit comments

Comments
 (0)