Skip to content

Commit 3f4945b

Browse files
committed
Restore tests
1 parent 3811567 commit 3f4945b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ultraplot/tests/test_legend.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,14 @@ def test_ref_with_single_axis():
608608
assert leg is not None
609609

610610

611+
def test_ref_with_manual_axes_no_subplotspec():
612+
"""Test using ref with axes that don't have subplotspec."""
613+
fig = uplt.figure()
614+
ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.4])
615+
ax2 = fig.add_axes([0.5, 0.1, 0.4, 0.4])
616+
ax1.plot([0, 1], [0, 1], label="line")
617+
618+
611619
def _decode_panel_span(panel_ax, axis):
612620
ss = panel_ax.get_subplotspec().get_topmost_subplotspec()
613621
r1, r2, c1, c2 = ss._get_rows_columns()

0 commit comments

Comments
 (0)