Coded modular to plot histograms of accepted samples