File size: 694 Bytes
fe41391 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
import numpy as np
import matplotlib.pyplot as plt
def test_stem_remove():
ax = plt.gca()
st = ax.stem([1, 2], [1, 2])
st.remove()
def test_errorbar_remove():
# Regression test for a bug that caused remove to fail when using
# fmt='none'
ax = plt.gca()
eb = ax.errorbar([1], [1])
eb.remove()
eb = ax.errorbar([1], [1], xerr=1)
eb.remove()
eb = ax.errorbar([1], [1], yerr=2)
eb.remove()
eb = ax.errorbar([1], [1], xerr=[2], yerr=2)
eb.remove()
eb = ax.errorbar([1], [1], fmt='none')
eb.remove()
def test_nonstring_label():
# Test for #26824
plt.bar(np.arange(10), np.random.rand(10), label=1)
plt.legend()
|