Naming plots when calling T->Draw()

ROOTers

How could I set up the name of plots generated from a TTree in the following way:

 T->SetMarkerColor(1);
  T->Draw("Cnorm4:plotName","","");
  T->SetMarkerColor(2);
  T->Draw("Onorm4:plotName","","same");

So when I call
gPad->BuildLegend(0.5,0.67,0.88,0.88,"My title : D ");

It generates a TLegend with proper descriptive names.

Thank you,

The default name ios “htemp”, You can force a different name with

T->Draw("Cnorm4:plotName>>name1","",""); T->Draw("Cnorm4:plotName>>name2","some condition","same");
Rene

I will add that the BuildLegend() function will use the leaf name(s) as the label of the histogram. To redefined the labels, I modified the title of the histograms:

T->Draw("Cnorm4:plotName>>name1","","");
T->Draw("Cnorm4:plotName>>name2","some condition","same");

name1->SetTitle("Plutonium_signal");
name2->SetTitle("Radium_signal");

Thanks Rene for your response. It was very helpful.