| 358 | |
| 359 | |
| 360 | def test_twinx_cla(): |
| 361 | fig, ax = plt.subplots() |
| 362 | ax2 = ax.twinx() |
| 363 | ax3 = ax2.twiny() |
| 364 | plt.draw() |
| 365 | assert not ax2.xaxis.get_visible() |
| 366 | assert not ax2.patch.get_visible() |
| 367 | ax2.cla() |
| 368 | ax3.cla() |
| 369 | |
| 370 | assert not ax2.xaxis.get_visible() |
| 371 | assert not ax2.patch.get_visible() |
| 372 | assert ax2.yaxis.get_visible() |
| 373 | |
| 374 | assert ax3.xaxis.get_visible() |
| 375 | assert not ax3.patch.get_visible() |
| 376 | assert not ax3.yaxis.get_visible() |
| 377 | |
| 378 | assert ax.xaxis.get_visible() |
| 379 | assert ax.patch.get_visible() |
| 380 | assert ax.yaxis.get_visible() |
| 381 | |
| 382 | |
| 383 | @pytest.mark.parametrize('twin', ('x', 'y')) |