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

Function test_titlesetpos

lib/matplotlib/tests/test_axes.py:7902–7914  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7900
7901
7902def test_titlesetpos():
7903 # Test that title stays put if we set it manually
7904 fig, ax = plt.subplots()
7905 fig.subplots_adjust(top=0.8)
7906 ax2 = ax.twiny()
7907 ax.set_xlabel('Xlabel')
7908 ax2.set_xlabel('Xlabel2')
7909 ax.set_title('Title')
7910 pos = (0.5, 1.11)
7911 ax.title.set_position(pos)
7912 renderer = fig.canvas.get_renderer()
7913 ax._update_title_position(renderer)
7914 assert ax.title.get_position() == pos
7915
7916
7917def test_title_xticks_top():

Callers

nothing calls this directly

Calls 9

subplots_adjustMethod · 0.80
set_xlabelMethod · 0.80
subplotsMethod · 0.45
twinyMethod · 0.45
set_titleMethod · 0.45
set_positionMethod · 0.45
get_rendererMethod · 0.45
get_positionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…