Hi
I want to use text labels on a TEfficiency plot. I got this halfway working (on screen), but the labels are gone when I try to save and restore the canvas. containing the plot.
It shows correct on screen. It shows correct if printed to pdf.
But if I write the TCanvas to a file and reopen it, the labels will be gone, the axis (x and y) range reset etc.
“my code”. well. I just modified the example macro to have some “minimal” kind of macro which show my problem. Actually I want to ship the Canvas over network to a httpserver with jsroot to display the canvas. Which works nicely for normal Histograms, but not TEfficiency.
In fact TEfficiency does not paint itself. It paints a TGraphAsymmErrors. Then you can act on the TGraphAsymmErrors to change its graphical attributes (that’s what you are doing). But in the list of primitives TEfficiency appears as such. So when you access it form saved canvas in a ROOT file it will be repainted and a new TGraphAsymmErrors will be created, which will not have the changed attributes. I would suggest to not save the TEfficiency but instead the modified TGraphAsymmErrors.