(fig_test, fig_ref)
| 671 | @mpl.rc_context({"savefig.transparent": True}) |
| 672 | @check_figures_equal() |
| 673 | def test_savefig_transparent(fig_test, fig_ref): |
| 674 | # create two transparent subfigures with corresponding transparent inset |
| 675 | # axes. the entire background of the image should be transparent. |
| 676 | gs1 = fig_test.add_gridspec(3, 3, left=0.05, wspace=0.05) |
| 677 | f1 = fig_test.add_subfigure(gs1[:, :]) |
| 678 | f2 = f1.add_subfigure(gs1[0, 0]) |
| 679 | |
| 680 | ax12 = f2.add_subplot(gs1[:, :]) |
| 681 | |
| 682 | ax1 = f1.add_subplot(gs1[:-1, :]) |
| 683 | iax1 = ax1.inset_axes([.1, .2, .3, .4]) |
| 684 | iax2 = iax1.inset_axes([.1, .2, .3, .4]) |
| 685 | |
| 686 | ax2 = fig_test.add_subplot(gs1[-1, :-1]) |
| 687 | ax3 = fig_test.add_subplot(gs1[-1, -1]) |
| 688 | |
| 689 | for ax in [ax12, ax1, iax1, iax2, ax2, ax3]: |
| 690 | ax.set(xticks=[], yticks=[]) |
| 691 | ax.spines[:].set_visible(False) |
| 692 | |
| 693 | |
| 694 | def test_figure_repr(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…