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

Function test_reset_grid

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

Source from the content-addressed store, hash-verified

6316
6317
6318def test_reset_grid():
6319 fig, ax = plt.subplots()
6320 ax.tick_params(reset=True, which='major', labelsize=10)
6321 assert not ax.xaxis.majorTicks[0].gridline.get_visible()
6322 ax.grid(color='red') # enables grid
6323 assert ax.xaxis.majorTicks[0].gridline.get_visible()
6324
6325 with plt.rc_context({'axes.grid': True}):
6326 ax.clear()
6327 ax.tick_params(reset=True, which='major', labelsize=10)
6328 assert ax.xaxis.majorTicks[0].gridline.get_visible()
6329
6330
6331@check_figures_equal()

Callers

nothing calls this directly

Calls 5

subplotsMethod · 0.45
tick_paramsMethod · 0.45
get_visibleMethod · 0.45
gridMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…