Revision 701fbd2b51b42f0be3207a9f802882150b76ff49 authored by Olivier Couet on 05 October 2006, 13:50:11 UTC, committed by Olivier Couet on 05 October 2006, 13:50:11 UTC
  it allows to add all the graphs in "*multigraph" in the current MultiGraph.
  Example:

 {
    float x1[] = {1,2,3}; float y1[] = {4,7,6};
    float x2[] = {3,5,6}; float y2[] = {0,9,4};
    float x3[] = {7,8,9}; float y3[] = {1,2,4};
    float x4[] = {0,6,5}; float y4[] = {5,2,7};

    TGraph *gr1 = new TGraph(3,x1,y1);
    TGraph *gr2 = new TGraph(3,x2,y2);
    TGraph *gr3 = new TGraph(3,x3,y3);
    TGraph *gr4 = new TGraph(3,x4,y4);

    TMultiGraph *mg1 = new TMultiGraph();
    mg1->Add(gr1); mg1->Add(gr2);
    TMultiGraph *mg2 = new TMultiGraph();
    mg2->Add(gr3); mg2->Add(gr4);
    mg2->Add(mg1); // mg2 now contains gr1 gr2 gr3 and gr4

    mg2->Draw("AL*");
 }


git-svn-id: http://root.cern.ch/svn/root/trunk@16436 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 65ab442
History
File Mode Size
inc
src
Module.mk -rw-r--r-- 3.8 KB

back to top