File indexing completed on 2026-10-16 08:48:25
0001 import matplotlib
0002
0003 matplotlib.use("Agg")
0004
0005
0006 def test_plotting(tmp_path):
0007
0008 import matplotlib.pyplot as plt
0009 import acts
0010
0011
0012
0013
0014
0015 hist = acts._demo_histogram1()
0016
0017 fig, ax = plt.subplots()
0018 hist.plot(ax=ax)
0019 fig.savefig(tmp_path / "demo_histogram.png")
0020
0021
0022 plt.close(fig)
0023
0024
0025 def test_boost_histogram_conversion():
0026
0027 import boost_histogram as bh
0028 import acts
0029
0030 hist = acts._demo_histogram1()
0031 bh_hist = bh.Histogram(
0032 hist
0033 )
0034
0035
0036 assert bh_hist.ndim == 1