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 8005d8a commit 6df9101Copy full SHA for 6df9101
lib/matplotlib/tests/test_axes.py
@@ -4105,6 +4105,24 @@ def test_violin_point_mass():
4105
"""Violin plot should handle point mass pdf gracefully."""
4106
plt.violinplot(np.array([0, 0]))
4107
4108
+
4109
+@cleanup
4110
+def test_autoscale():
4111
+ plt.plot([0, 1], [0, 1])
4112
+ assert_equal(plt.xlim(), (0, 1))
4113
+ plt.autoscale(False)
4114
+ plt.plot([2, 3], [2, 3])
4115
4116
+ plt.autoscale(True)
4117
+ plt.plot([1, 2], [1, 2])
4118
+ assert_equal(plt.xlim(), (0, 3))
4119
+ with plt.autoscale(False):
4120
+ plt.plot([3, 4], [3, 4])
4121
4122
+ plt.plot([4, 5], [4, 5])
4123
+ assert_equal(plt.xlim(), (0, 5))
4124
4125
4126
if __name__ == '__main__':
4127
import nose
4128
import sys
0 commit comments