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

Function test_tight_layout7

lib/matplotlib/tests/test_tightlayout.py:124–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122
123@image_comparison(['tight_layout7'], style='mpl20')
124def test_tight_layout7():
125 # tight layout with left and right titles
126 fontsize = 24
127 fig, ax = plt.subplots()
128 ax.plot([1, 2])
129 ax.locator_params(nbins=3)
130 ax.set_xlabel('x-label', fontsize=fontsize)
131 ax.set_ylabel('y-label', fontsize=fontsize)
132 ax.set_title('Left Title', loc='left', fontsize=fontsize)
133 ax.set_title('Right Title', loc='right', fontsize=fontsize)
134 plt.tight_layout()
135
136
137@image_comparison(['tight_layout8'], style='mpl20', tol=0.005)

Callers

nothing calls this directly

Calls 7

locator_paramsMethod · 0.80
set_xlabelMethod · 0.80
set_ylabelMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45
set_titleMethod · 0.45
tight_layoutMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…