ProfileX for two Plots

From: Mohammed Mahmoud Mohammed <mohammed.attia_at_cern.ch>
Date: Fri, 19 Nov 2010 10:30:19 +0100

Dear ROOTers,

I have a problem.

I tried to plot two 2-D plots in the same plot after making ProfileX,  

But I got the plot for one plot only, I do not know what is the wrong.


TFile *f1 = new TFile("HLTMinBias_5_11.root"); TFile *f2 = new TFile("HLTPTM_5_11.root");

              
                f1->cd ("demo");
	
   			TH2D *myHist=(TH2D*)gDirectory->Get("kaonpionloop1");   
  			TProfile *p=myHist->ProfileX();
			p->SetMarkerColor(kBlue);
			p->Draw();
		
 
		f2->cd ("demo");
	
			TH2D *myHist1=(TH2D*)gDirectory->Get("kaonpionloop1"); 
			TProfile *p1=myHist1->ProfileX();
			p1->SetMarkerColor(kRed);
 			p1->Draw("same");

PLease, can you tell me what is my error?

Thanks in advance

Mohammed Received on Fri Nov 19 2010 - 10:30:23 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 19 2010 - 17:50:01 CET