Hi rooters,
I do:
TFile *f=new TFile(“hsimple.root”);
hpx->Draw();
TLine *l = new TLine (-3, 100, 2, 600);
l->Draw(); // ok the line appears
hpx->Fit(“gaus”); // the line disappears
Is it possible to avoid disappearing existing primitives when the
fit function is drawn?
Cheers
Otto :
Hi Otto,
TFile *f = new TFile("hsimple.root");
hpx->Draw();
TLine *l = new TLine (-3, 100, 2, 600);
l->Draw();
hpx->GetListOfFunctions()->Add(l);
hpx->Fit("gaus");
TFile *f = new TFile("hsimple.root");
hpx->Draw();
TLine *l = new TLine (-3, 100, 2, 600);
l->Draw();
hpx->Fit("gaus", "", "same");
Jan
Hi Jan,
thanks for your answer.
In the simple case I posted this can be done,
however if one adds elements with the graphics editor that doesnt
help.
Cheers
Otto
[quote]however if one adds elements with the graphics editor that doesnt
help.[/quote]in this case use second method: hpx->Fit(“gaus”, “”, “same”);
Jan
Hi Jan,
thanks, that helps
Otto