Colored Error Bars

From: Daniel A. Fagundes <fagundes_at_ifi.unicamp.br>
Date: Tue, 22 Mar 2011 15:28:06 -0300


Hi,
I'm new in ROOT and I'm having a problem on drawing a graph with colored error bars.
Here it goes a little piece of my macro:

*TCanvas *c1 = new TCanvas("c1","Differential Cross Section",200,10,700,500);

    c1->SetFillColor(0);
    c1->SetLogy();

 TGraphErrors *gr1 = new
TGraphErrors(npt_19,q2_exp_pp19,dsdt_exp_pp19,erX_dsdt_exp_pp19,erY_dsdt_exp_pp19);  TGraphErrors *gr2 = new
TGraphErrors(npt_23,q2_exp_pp23,dsdt_exp_pp23,erX_dsdt_exp_pp23,erY_dsdt_exp_pp23);

    gr1->SetMarkerStyle(20);
    gr1->SetMarkerSize(0.6);
    gr1->SetMarkerColor(2);

    gr2->SetMarkerStyle(20);

    gr2->SetMarkerSize(0.6);
    gr2->SetMarkerColor(8);

TMultiGraph *mg = new TMultiGraph();

    mg->Add(gr1);
    mg->Add(gr2);
    mg->Draw("APZ");*

In the output only the central values gets different colors. Could anyone help me with this?
Appreciate any help,
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 Tue Mar 22 2011 - 19:28:42 CET

This archive was generated by hypermail 2.2.0 : Tue Mar 22 2011 - 23:50:01 CET