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

Function test_twinning_default_axes_class

lib/matplotlib/tests/test_axes.py:8215–8224  ·  view source on GitHub ↗

Check that the default class for twinx/y() is Axes, even if the original is an Axes subclass.

()

Source from the content-addressed store, hash-verified

8213
8214
8215def test_twinning_default_axes_class():
8216 """
8217 Check that the default class for twinx/y() is Axes,
8218 even if the original is an Axes subclass.
8219 """
8220 _, ax = plt.subplots(subplot_kw=dict(axes_class=SubclassAxes, foo=1))
8221 twinx = ax.twinx()
8222 assert type(twinx) is Axes
8223 twiny = ax.twiny()
8224 assert type(twiny) is Axes
8225
8226
8227def test_twinning_patch_visibility_default():

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…