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

Function test_bbox_inches

lib/matplotlib/tests/test_backend_pgf.py:202–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200@mpl.style.context('default')
201@pytest.mark.backend('pgf')
202def test_bbox_inches():
203 mpl.rcParams.update({'font.family': 'serif', 'pgf.rcfonts': False})
204 fig, (ax1, ax2) = plt.subplots(1, 2)
205 ax1.plot(range(5))
206 ax2.plot(range(5))
207 plt.tight_layout()
208 bbox = ax1.get_window_extent().transformed(fig.dpi_scale_trans.inverted())
209 compare_figure('pgf_bbox_inches.pdf', savefig_kwargs={'bbox_inches': bbox},
210 tol=0)
211
212
213@mpl.style.context('default')

Callers

nothing calls this directly

Calls 8

compare_figureFunction · 0.85
updateMethod · 0.45
subplotsMethod · 0.45
plotMethod · 0.45
tight_layoutMethod · 0.45
transformedMethod · 0.45
get_window_extentMethod · 0.45
invertedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…