MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_basic

Method test_basic

lib/matplotlib/tests/test_figure.py:1034–1055  ·  view source on GitHub ↗
(self, fig_test, fig_ref, x)

Source from the content-addressed store, hash-verified

1032 ]
1033 )
1034 def test_basic(self, fig_test, fig_ref, x):
1035 grid_axes = fig_test.subplot_mosaic(x)
1036
1037 for k, ax in grid_axes.items():
1038 ax.set_title(k)
1039
1040 labels = sorted(np.unique(x))
1041
1042 assert len(labels) == len(grid_axes)
1043
1044 gs = fig_ref.add_gridspec(2, 3)
1045 axA = fig_ref.add_subplot(gs[:1, :2])
1046 axA.set_title(labels[0])
1047
1048 axB = fig_ref.add_subplot(gs[:, 2])
1049 axB.set_title(labels[1])
1050
1051 axC = fig_ref.add_subplot(gs[1, 0])
1052 axC.set_title(labels[2])
1053
1054 axD = fig_ref.add_subplot(gs[1, 1])
1055 axD.set_title(labels[3])
1056
1057 @check_figures_equal()
1058 def test_all_nested(self, fig_test, fig_ref):

Callers

nothing calls this directly

Calls 4

subplot_mosaicMethod · 0.80
add_gridspecMethod · 0.80
add_subplotMethod · 0.80
set_titleMethod · 0.45

Tested by

no test coverage detected