[ROOT] TF2 and the cont4z draw option

From: Sven Schagen (h31@nikhef.nl)
Date: Mon Jun 30 2003 - 09:16:09 MEST


Dear Rooters,

while playing around with plotting a TF2 object, I encountered strange, 
inconsistent behaviour. For reference, I have attached a simple macro that 
shows the problem. I found this problem with ROOT v3.05/04 on a redhat 6.3 
machine. 

I have three objects: two TGraphs and one TF2. I want to plot the two 
graphs on top of the TF2. But when the TF2 is drawn with the option 
"cont4z" (colour-filled contours with the z-scale on the right y-axis) one 
of the TGraphs fails to be drawn and the second is drawn at a (very) 
different, and wrong,  position. This is illustrated in the figure 
strange.(eps/png) which is the result of running the macro below on the 
datafile. The figures can be found at 
http://www.nikhef.nl/~h31/development/root/. The pictures were too long to 
be send by mail. 

The question now is: am I missing something here, or is this indeed 
unexpected behaviour ?

		Cheers,
			Sven

#--- The macro code
{

  /* Setup basics */
  gROOT->Reset();
  TCanvas* c1 = new TCanvas("c1","2 dimensional fit results",900,900);
  c1->Divide(2,2);  
  TFile* f1 = new TFile("../data/hvqfits_cteq6_2D_hf255.root","READ");

  /* Get objects from file */
  TF2*  chi2fit   = (TF2*)(f1->Get("Chi2Fit_charm_mass_and_epsilon2"));
  TGraph* minimum = (TGraph*)(f1->Get("BestFit_charm_mass_and_epsilon2"));
  TGraph* onesigm = (TGraph*)(f1->Get("onesig_c_and_e"));

  /* Distinguish best fit point */
  minimum->SetMarkerStyle(20);
  minimum->SetMarkerColor(2);

  /* Draw */
  c1->cd(1);
  chi2fit->Draw("colz");
  minimum->Draw("p");
  onesigm->Draw("p");

  c1->cd(2);
  chi2fit->Draw("cont1z");
  minimum->Draw("p");
  onesigm->Draw("p");

  c1->cd(3);
  chi2fit->Draw("cont3z");
  minimum->Draw("p");
  onesigm->Draw("p");

  c1->cd(4);
  chi2fit->Draw("cont4z");
  minimum->Draw("p");
  onesigm->Draw("p");

  c1->cd();
  c1->Update();

  c1.SaveAs("strange.eps");
}



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET