Tree->Draw("var>>hist")

You can also do:

  for(int nbfile=0; nbfile<nfile; nbfile++){
    for(int nbdir=0; nbdir<ndir; nbdir++){
      hmupt[nbfile][nbdir]->SetLineColor(2+nbfile);
      if (nbfile == 0 && nbdir == 0)
         hmupt[nbfile][nbdir]->Draw("hist");
      else
         hmupt[nbfile][nbdir]->Draw("hist same");
    }
  }

Hi Bellenot,

  • yes for nbfile==0 the color is white so I could not see it!
  • It works for me too.
  • Thank you and Couet for your help!
    Regards

I would suggest that you check individually that your histograms are properly filled (doing individual plots one by one) . Remember you have an empty TTree…

Dear Couet,
ok, I’ll do that. Thank you for your help.
Regards

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