in order to draw a TF1 with different parameter settings to differend TPads in a TCanvas, I used the methode DrawCopy(), since using Draw() would update all pads to the latest parameter setting when updating the TCanvas. Unfortunately it seems that I cannot access the histogram of the TF1 by using TF1::GetHistogram() to configure the style, like it is possible after using Draw().
I already tried as well with gPad->GetListOfPrimitives()->At(…), but also it didn’t work.
Can somebody tell me how to access the histogram, perhaps via the TPad?
Funny thing, when I do e.g. f2->GetHistogram()->SetTitle("a;b;c") then the titles are updated on the plot, and f2->GetHistogram()->GetEntries() prints 200.000. But f2->Draw() or drawing the histogram directly crashes.
I think some style changes indeed work (SetLabelSize, SetNdivisions,…), since those things are being immediately updated, while others like axis ranges are not.