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

Function test_secondary_init_xticks

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

Source from the content-addressed store, hash-verified

8627
8628
8629def test_secondary_init_xticks():
8630 fig, ax = plt.subplots()
8631 secax = ax.secondary_xaxis(1, xticks=[0, 1])
8632 assert isinstance(secax.xaxis.get_major_locator(), mticker.FixedLocator)
8633 with pytest.raises(TypeError):
8634 secax.set_yticks([0, 1])
8635 secax = ax.secondary_yaxis(1, yticks=[0, 1])
8636 assert isinstance(secax.yaxis.get_major_locator(), mticker.FixedLocator)
8637 with pytest.raises(TypeError):
8638 secax.set_xticks([0, 1])
8639
8640
8641def test_secondary_repr():

Callers

nothing calls this directly

Calls 6

secondary_xaxisMethod · 0.80
get_major_locatorMethod · 0.80
set_yticksMethod · 0.80
secondary_yaxisMethod · 0.80
set_xticksMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…