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

Function test_reset_ticks

lib/matplotlib/tests/test_axes.py:6332–6348  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

6330
6331@check_figures_equal()
6332def test_reset_ticks(fig_test, fig_ref):
6333 for fig in [fig_ref, fig_test]:
6334 ax = fig.add_subplot()
6335 ax.grid(True)
6336 ax.tick_params(
6337 direction='in', length=10, width=5, color='C0', pad=12,
6338 labelsize=14, labelcolor='C1', labelrotation=45,
6339 grid_color='C2', grid_alpha=0.8, grid_linewidth=3,
6340 grid_linestyle='--')
6341 fig.draw_without_rendering()
6342
6343 # After we've changed any setting on ticks, reset_ticks will mean
6344 # re-creating them from scratch. This *should* appear the same as not
6345 # resetting them.
6346 for ax in fig_test.axes:
6347 ax.xaxis.reset_ticks()
6348 ax.yaxis.reset_ticks()
6349
6350
6351@mpl.style.context('mpl20')

Callers

nothing calls this directly

Calls 5

add_subplotMethod · 0.80
reset_ticksMethod · 0.80
gridMethod · 0.45
tick_paramsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…