Handling zero bin contents

ROOT Version: 6.32.04
Platform: WSL2 Ubuntu

Hello! Is it possible to draw a histogram but skip the bins that have zero contents? The reason I ask is that I am plotting several histograms on the same canvas spaced by a factor of 1E10 (a spacing of 10 on a log scale). However, because the histograms on top have a few zero bins it drops lines to the bottom and messes up the rest of the canvas.

Any solutions? Thank you in advance.

Cheers, Philip.

Do you absolutely need to draw lines? If not, I would try hist->Draw("P");

This will draw with points instead of lines (you should also probably set your marker style, color, and size), so it won’t show the 0 bins.