Hi,
in 2D mode, I can not display data ADOPTED by a histogram programmatically, but I can display the data manually by first enabling the “Can Edit Histograms” menu option, and then click the left mouse button.
If In 3D mode (lego), data is displayed programmatically. The issue is only in 2D mode.
Essential steps in the program are:
TArrayD data is Adopted by histogram
Histogram is Drawn()
TCanvas is Modified()
TCanvas is Updated()
I even tried TH2D::SetOption(“kCanRebin”) and TH2D::Paint(), but has no effect.
I know the bins got the data; Status bar shows the values as I move the mouse; I can see the data if the histogram is displayed 3D mode (lego).
It is just that I can not see it even with after envoking the TCanvas::Update() function in 2D mode.
Once I have enabled the “Can Edit Histogram” menu option and left-click the mouse, both the Stats box and data are shown.
Is there some other essential function calls needed that I have missed before data is displayed when data is ADOPTED?
Another strange behavior is that, as soon as one histogram has been drawn properly on one canvas, subquently DRAW on a different canvas will immediately display the data (without clicking the left buton on the mouse), even if “can edit histogram” is NOT enabled.
So, it is a mystery why having one properly drawn histogram will permit proper subsequent draws.
What ROOT environment variable(s) could have been changed having drawn one histogram?
How can one programatically enable the “can edit histograms” menu option? SetOption(“kCanRebin”) ?
Thanks for your suggestions.
sVi-Hoa