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

Function test_twinx_knows_limits

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

Source from the content-addressed store, hash-verified

8181
8182
8183def test_twinx_knows_limits():
8184 fig, ax = plt.subplots()
8185
8186 ax.axvspan(1, 2)
8187 xtwin = ax.twinx()
8188 xtwin.plot([0, 0.5], [1, 2])
8189 # control axis
8190 fig2, ax2 = plt.subplots()
8191
8192 ax2.axvspan(1, 2)
8193 ax2.plot([0, 0.5], [1, 2])
8194
8195 assert_array_equal(xtwin.viewLim.intervalx, ax2.viewLim.intervalx)
8196
8197
8198class SubclassAxes(Axes):

Callers

nothing calls this directly

Calls 4

axvspanMethod · 0.80
subplotsMethod · 0.45
twinxMethod · 0.45
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…