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

Method test_basic

lib/matplotlib/tests/test_ticker.py:154–161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152
153class TestAutoMinorLocator:
154 def test_basic(self):
155 fig, ax = plt.subplots()
156 ax.set_xlim(0, 1.39)
157 ax.minorticks_on()
158 test_value = np.array([0.05, 0.1, 0.15, 0.25, 0.3, 0.35, 0.45,
159 0.5, 0.55, 0.65, 0.7, 0.75, 0.85, 0.9,
160 0.95, 1.05, 1.1, 1.15, 1.25, 1.3, 1.35])
161 assert_almost_equal(ax.xaxis.get_ticklocs(minor=True), test_value)
162
163 # NB: the following values are assuming that *xlim* is [0, 5]
164 params = [

Callers

nothing calls this directly

Calls 4

get_ticklocsMethod · 0.80
subplotsMethod · 0.45
set_xlimMethod · 0.45
minorticks_onMethod · 0.45

Tested by

no test coverage detected