8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5586d43 commit 4f30cceCopy full SHA for 4f30cce
lib/matplotlib/tests/test_axes.py
@@ -4118,6 +4118,23 @@ def test_axisbg_warning():
4118
("The axisbg attribute was deprecated in version 2.0.")))
4 B5B5 119
4119
4120
4121
+@cleanup
4122
+def test_autoscale():
4123
+ plt.plot([0, 1], [0, 1])
4124
+ assert_equal(plt.xlim(), (0, 1))
4125
+ plt.autoscale(False)
4126
+ plt.plot([2, 3], [2, 3])
4127
4128
+ plt.autoscale(True)
4129
+ plt.plot([1, 2], [1, 2])
4130
+ assert_equal(plt.xlim(), (0, 3))
4131
+ with plt.autoscale(False):
4132
+ plt.plot([3, 4], [3, 4])
4133
4134
+ plt.plot([4, 5], [4, 5])
4135
+ assert_equal(plt.xlim(), (0, 5))
4136
+
4137
4138
if __name__ == '__main__':
4139
import nose
4140
import sys
0 commit comments