Test histogram visual
()
| 10 | |
| 11 | @requires_application() |
| 12 | def test_histogram(): |
| 13 | """Test histogram visual""" |
| 14 | size = (200, 100) |
| 15 | with TestingCanvas(size=size, bgcolor='w') as c: |
| 16 | np.random.seed(2397) |
| 17 | data = np.random.normal(size=100) |
| 18 | hist = Histogram(data, bins=20, color='k', parent=c.scene) |
| 19 | hist.transform = STTransform((size[0] // 10, -size[1] // 20, 1), |
| 20 | (100, size[1])) |
| 21 | assert_image_approved(c.render(), "visuals/histogram.png") |
| 22 | |
| 23 | |
| 24 | run_tests_if_main() |
nothing calls this directly
no test coverage detected
searching dependent graphs…