Create more than one Canvas and fill each one with a different plot

Hi guys, i am a rookie in pyroot and i am having trouble creating a code that allows me to create more than one canvas and for each canvas plot my data and fit it. I am searching a way to create a macro that allows me to do it fast with a loop for or something.
Thank you

this one makes 5 canvas:

{
    int n=5;
    for (int i=0;i<n;i++) {
       TH1F * hist=new TH1F(Form("h%d",i),"",50,-3,3);
       hist->FillRandom("gaus",1000);
       auto c = new TCanvas(Form("c%d",i),"");
       hist->Draw();
    }
}

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.