test_container.py 576 B

123456789101112131415161718192021222324252627282930
  1. import matplotlib.pyplot as plt
  2. def test_stem_remove():
  3. ax = plt.gca()
  4. st = ax.stem([1, 2], [1, 2], use_line_collection=True)
  5. st.remove()
  6. def test_errorbar_remove():
  7. # Regression test for a bug that caused remove to fail when using
  8. # fmt='none'
  9. ax = plt.gca()
  10. eb = ax.errorbar([1], [1])
  11. eb.remove()
  12. eb = ax.errorbar([1], [1], xerr=1)
  13. eb.remove()
  14. eb = ax.errorbar([1], [1], yerr=2)
  15. eb.remove()
  16. eb = ax.errorbar([1], [1], xerr=[2], yerr=2)
  17. eb.remove()
  18. eb = ax.errorbar([1], [1], fmt='none')
  19. eb.remove()