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

Method test_presets

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

Source from the content-addressed store, hash-verified

82 assert loc.presets == {(0, 1): []}
83
84 def test_presets(self):
85 loc = mticker.LinearLocator(presets={(1, 2): [1, 1.25, 1.75],
86 (0, 2): [0.5, 1.5]})
87 assert loc.tick_values(1, 2) == [1, 1.25, 1.75]
88 assert loc.tick_values(2, 1) == [1, 1.25, 1.75]
89 assert loc.tick_values(0, 2) == [0.5, 1.5]
90 assert loc.tick_values(0.0, 2.0) == [0.5, 1.5]
91 assert (loc.tick_values(0, 1) == np.linspace(0, 1, 11)).all()
92
93
94class TestMultipleLocator:

Callers

nothing calls this directly

Calls 1

tick_valuesMethod · 0.95

Tested by

no test coverage detected