Fill area between two curves

From: Daniel A. Fagundes <fagundes_at_ifi.unicamp.br>
Date: Fri, 14 Oct 2011 10:40:01 -0300


Hi Rooters,
does anybody know how to fill the area defined by two TGraph curves?! For reference I send part of my code:

 TGraph *gr11 = new
TGraph(np_teo_pp_mg350,s_sqr_teo_pp_mg350,sig_tot_teo_pp_mg350);

  gr11->SetLineStyle(1);
  gr11->SetLineWidth(2);
  gr11->SetLineColor(1);

  TGraph *gr21 = new
TGraph(np_teo_pp_mg400,s_sqr_teo_pp_mg400,sig_tot_teo_pp_mg400);

  gr21->SetLineStyle(1);
  gr21->SetLineWidth(2);
  gr21->SetLineColor(2);

  TMultiGraph *mg1 = new TMultiGraph();

  mg1->Add(gr11);
  mg1->Add(gr21);
  mg1->Draw("AL");

How do I get the area between gr11 and gr21 filled? Thanks in advance,
Daniel.



Daniel Almeida Fagundes
Estudante de Doutorado - PhD Physics Student Universidade Estadual de Campinas - UNICAMP Instituto de Física Gleb Wataghin - IFGW Departamento de Raios Cósmicos e Cronologia - DRCC Grupo Teórico - Fenomenologia das Interações Hadrônicas Sala: 205
Ramal: 5535
Contatos:
Tel: +55 (19) 3521-5535
Cel: +55 (19) 9366-4227

-----------------------------------------------------------------------------------------
Received on Fri Oct 14 2011 - 15:40:36 CEST

This archive was generated by hypermail 2.2.0 : Wed Oct 26 2011 - 23:50:02 CEST