Redraw TH1 and omit the empty histos

For a THStack you will need to loop over the contained histograms, or use the “last” histogram which contains the sum. See this discussion regarding the same issue in PyROOT:

Jean-François