I tried to plot a family of functions in the same Pad by defining a function with one free parameter and then tried to set this parameter and draw as follows:
TF1 *f1 = new TF1("f1","*sin(x)",0,1); f1->SetParameter(0,0); f1->Draw(); for (int i=1;i<10> f1->SetParameter(0,i); f1->SetLineColor(i+1); f1->Draw("same"); }
!!of course it should be “for (int i=1;i<10;i++)”, but anytime I type it like this it is displayed another way!?
it seems that root updates the drawn function everytime so I only can see the last curve.
Does anybody have an idea about how I can see all this functions in the Pad, perhaps a better method than I tried?
thanks a lot!