()
| 6420 | |
| 6421 | |
| 6422 | def test_shared_with_aspect_2(): |
| 6423 | # Share 2 axes only with 'box': |
| 6424 | fig, axs = plt.subplots(nrows=2, sharex=True, sharey=True) |
| 6425 | axs[0].set_aspect(2, share=True) |
| 6426 | axs[0].plot([1, 2], [3, 4]) |
| 6427 | axs[1].plot([3, 4], [1, 2]) |
| 6428 | plt.draw() # Trigger apply_aspect(). |
| 6429 | assert axs[0].get_xlim() == axs[1].get_xlim() |
| 6430 | assert axs[0].get_ylim() == axs[1].get_ylim() |
| 6431 | |
| 6432 | |
| 6433 | def test_shared_with_aspect_3(): |