Disappearing histogram plots

I am plotting two successive sequences of histograms in one macro. The general program flow is quite linear:

  1. instantiate the first set of histograms
  2. fill the first set of histograms
  3. draw the first set of histograms
  4. instantiate the second set of histograms
  5. fill the second set of histograms
  6. draw the second set of histograms

Each plot has its own canvas, and I immediately Update each canvas after Draw is called so that I can promptly see what is in each histogram.

All of the histograms in the first set appear fully filled after the corresponding Update is called. However, as program executation works down through the second set of histograms, one of the histogram plots from the first set suddenly disappears for no particular reason that I can think of. One second, it is there and I am looking at it just fine; the next second, the canvas goes blank.

I have checked to make sure that all of the histogram names are different (in case one was somehow writing over another). An additional odd quirk is that, after the code for the second set of histograms, if I then place code to re-plot the disappeared histogram on a new canvas, it will plot it just fine, and the plot never disappears. It seems that, for some reason, this one histogram just doesn’t want to be plotted (and stay plotted!!!) at the point in the code where I want it to be plotted. If I do not explicitly include code to re-plot the disappeared histogram, it never reappears on its own.

Does anyone have any thoughts on this matter that they can offer?

Thanks,

Aaron

Could you send the shortest possible script reproducing your problem and indicate your version of ROOT?

Rene

Thanks so much for offering to help! However, in the meantime, I have performed various changes to the code, and the problem seemingly went away. I’m not sure what change fixed things, though…

Thanks again!

Aaron