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

Function test_autoscale_log_shared

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

Source from the content-addressed store, hash-verified

670
671@mpl.style.context('default')
672def test_autoscale_log_shared():
673 # related to github #7587
674 # array starts at zero to trigger _minpos handling
675 x = np.arange(100, dtype=float)
676 fig, (ax1, ax2) = plt.subplots(2, 1, sharex=True)
677 ax1.loglog(x, x)
678 ax2.semilogx(x, x)
679 ax1.autoscale(tight=True)
680 ax2.autoscale(tight=True)
681 plt.draw()
682 lims = (x[1], x[-1])
683 assert_allclose(ax1.get_xlim(), lims)
684 assert_allclose(ax1.get_ylim(), lims)
685 assert_allclose(ax2.get_xlim(), lims)
686 assert_allclose(ax2.get_ylim(), (x[0], x[-1]))
687
688
689@mpl.style.context('default')

Callers

nothing calls this directly

Calls 7

loglogMethod · 0.80
semilogxMethod · 0.80
subplotsMethod · 0.45
autoscaleMethod · 0.45
drawMethod · 0.45
get_xlimMethod · 0.45
get_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…