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

Function test_secondary_fail

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

Source from the content-addressed store, hash-verified

8566
8567
8568def test_secondary_fail():
8569 fig, ax = plt.subplots()
8570 ax.plot(np.arange(2, 11), np.arange(2, 11))
8571 with pytest.raises(ValueError):
8572 ax.secondary_xaxis(0.2, functions=(lambda x: 1 / x))
8573 with pytest.raises(ValueError):
8574 ax.secondary_xaxis('right')
8575 with pytest.raises(ValueError):
8576 ax.secondary_yaxis('bottom')
8577 with pytest.raises(TypeError):
8578 ax.secondary_xaxis(0.2, transform='error')
8579
8580
8581def test_secondary_resize():

Callers

nothing calls this directly

Calls 4

secondary_xaxisMethod · 0.80
secondary_yaxisMethod · 0.80
subplotsMethod · 0.45
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…