test_moving_distribution_plot.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. import numpy
  4. import pytest
  5. from draugr.drawers.mpl_drawers.distribution_plot import DistributionPlot
  6. __author__ = "Christian Heider Nielsen"
  7. __doc__ = r"""
  8. Created on 9/2/19
  9. """
  10. @pytest.mark.skip
  11. def test_moving_distribution_plot():
  12. data_generator = iter(
  13. [
  14. [1, 0, 0],
  15. [1, 0, 0],
  16. [1, 0, 0],
  17. [1, 0, 0],
  18. [1, 0, 0],
  19. [0, 0, 1],
  20. [0, 0, 1],
  21. [0, 0, 1],
  22. [0, 0, 1],
  23. [0, 0, 1],
  24. [0, 0, 1],
  25. [0, 1, 0],
  26. [0, 1, 0],
  27. [0, 1, 0],
  28. [0, 1, 0],
  29. [0, 1, 0],
  30. [0, 1, 0],
  31. [0, 1, 0],
  32. [0, 1, 0],
  33. ]
  34. )
  35. # moving_distribution_plot(data_generator, labels=("a", "b", "c"))
  36. delta = 1.0 / 60.0
  37. s = DistributionPlot()
  38. for LATEST_GPU_STATS in range(100):
  39. s.draw(numpy.random.sample(), delta)
  40. assert True
  41. if __name__ == "__main__":
  42. test_moving_distribution_plot()