add a macro to draw diagnostic histograms