#include "/users/arwagner/lib/root/plot.h"

void tho_e1e2()

{
  c1 = new TCanvas("c1","Error Ellipses",100,100,700,700);
  c1->SetFillStyle(4000);
  Double_t r = 0.8;

//---------------------------------------------------------------------
  // create an empty, transparently filled overlay frame 
   TPad *overlay = new TPad("overlay","",0,0,1,1);
   overlay->SetFillStyle(4000);
   overlay->SetFillColor(0);
   overlay->SetFrameFillStyle(4000);
   overlay->Draw();
   overlay->cd();

  // generate a coordinate system therein
  TH1F *hframe = overlay->DrawFrame(-0.8,-0.8,0.8,0.8);
//
//---------------------------------------------------------------------

  // proceed with the plot	
  TF2 *XY12 = new TF2("f2","33.2*x**2 + 41.5* y**2  + (0.12)*x*y",-r,r,-r,r);
  XY12->SetFillStyle(4000);

  XY12->SetContour(2);
  XY12->SetContourLevel(0,1.0);
  XY12->Draw("same");

  gStyle->SetOptStat(kFALSE);
  c1->Print("myfile.pdf");
  
}


