8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab3f95a commit 5a3ba09Copy full SHA for 5a3ba09
lib/matplotlib/tests/test_figure.py
@@ -579,3 +579,19 @@ def test_add_subplot_twotuple():
579
ax4 = fig.add_subplot(3, 2, (3, 6))
580
assert ax4.get_subplotspec().rowspan == range(1, 3)
581
assert ax4.get_subplotspec().colspan == range(0, 2)
582
+
583
584
+def test_reuse_gridspec():
585
+ fig = plt.figure()
586
+ ax = [None] * 9
587
+ for i in range(9):
588
+ ax[i] = fig.add_subplot(3, 3, i + 1)
589
+ for i in range(1, 9):
590
+ assert (ax[i].get_subplotspec().get_gridspec() ==
591
+ ax[0].get_subplotspec().get_gridspec())
592
593
594
+ ax1 = fig.add_subplot(3, 3, (1, 7))
595
+ ax2 = fig.add_subplot(3, 3, (6, 9))
596
+ assert (ax1.get_subplotspec().get_gridspec() ==
597
+ ax2.get_subplotspec().get_gridspec())
0 commit comments