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

Function test_twinning_with_axes_class

lib/matplotlib/tests/test_axes.py:8204–8212  ·  view source on GitHub ↗

Check that twinx/y(axes_class=...) gives the appropriate class.

()

Source from the content-addressed store, hash-verified

8202
8203
8204def test_twinning_with_axes_class():
8205 """Check that twinx/y(axes_class=...) gives the appropriate class."""
8206 _, ax = plt.subplots()
8207 twinx = ax.twinx(axes_class=SubclassAxes, foo=1)
8208 assert isinstance(twinx, SubclassAxes)
8209 assert twinx.foo == 1
8210 twiny = ax.twiny(axes_class=SubclassAxes, foo=2)
8211 assert isinstance(twiny, SubclassAxes)
8212 assert twiny.foo == 2
8213
8214
8215def test_twinning_default_axes_class():

Callers

nothing calls this directly

Calls 3

subplotsMethod · 0.45
twinxMethod · 0.45
twinyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…