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

Function test_get_tick_position_rcParams

lib/matplotlib/tests/test_axis.py:59–67  ·  view source on GitHub ↗

Test that get_tick_position() correctly picks up rcParams tick positions.

()

Source from the content-addressed store, hash-verified

57
58
59def test_get_tick_position_rcParams():
60 """Test that get_tick_position() correctly picks up rcParams tick positions."""
61 plt.rcParams.update({
62 "xtick.top": 1, "xtick.labeltop": 1, "xtick.bottom": 0, "xtick.labelbottom": 0,
63 "ytick.right": 1, "ytick.labelright": 1, "ytick.left": 0, "ytick.labelleft": 0,
64 })
65 ax = plt.figure().add_subplot()
66 assert ax.xaxis.get_ticks_position() == "top"
67 assert ax.yaxis.get_ticks_position() == "right"
68
69
70def test_get_tick_position_tick_top_tick_right():

Callers

nothing calls this directly

Calls 4

add_subplotMethod · 0.80
figureMethod · 0.80
updateMethod · 0.45
get_ticks_positionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…