TMultiGraph


class description - source file - inheritance tree

class TMultiGraph : public TNamed


    public:
TMultiGraph TMultiGraph() TMultiGraph TMultiGraph(const char* name, const char* title) TMultiGraph TMultiGraph(const TMultiGraph&) virtual void ~TMultiGraph() virtual void Add(TGraph* graph, Option_t* chopt) virtual void Browse(TBrowser* b) static TClass* Class() virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void Draw(Option_t* chopt) TH1F* GetHistogram() const TList* GetListOfGraphs() const TAxis* GetXaxis() const TAxis* GetYaxis() const virtual TClass* IsA() const virtual void Paint(Option_t* chopt) virtual void Print(Option_t* chopt) const virtual void SavePrimitive(ofstream& out, Option_t* option) virtual void SetMaximum(Double_t maximum = -1111) virtual void SetMinimum(Double_t minimum = -1111) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
TList* fGraphs Pointer to list of TGraphs TH1F* fHistogram Pointer to histogram used for drawing axis Double_t fMaximum Maximum value for plotting along y Double_t fMinimum Minimum value for plotting along y

Class Description

   A TMultiGraph is a collection of TGraph (or derived) objects
   Use TMultiGraph::Add to add a new graph to the list.
   The TMultiGraph owns the objects in the list.
   Drawing options are the same as for TGraph
   Example;
     TGraph *gr1 = new TGraph(...
     TGraphErrors *gr2 = new TGraphErrors(...
     TMultiGraph *mg = new TMultiGraph();
     mg->Add(gr1,"lp");
     mg->Add(gr2,"cp");
     mg->Draw("a");

  The drawing option for each TGraph may be specified as an optional
  second argument of the Add function.
  If a draw option is specified, it will be used to draw the graph,
  otherwise the graph will be drawn with the option specified in
  TMultiGraph::Draw

TMultiGraph(): TNamed()
 TMultiGraph default constructor

TMultiGraph(const char *name, const char *title) : TNamed(name,title)
 constructor with name and title

~TMultiGraph()
 TMultiGraph destructor

void Add(TGraph *graph, Option_t *chopt)
 add a new graph to the list of graphs

void Browse(TBrowser *)

Int_t DistancetoPrimitive(Int_t px, Int_t py)
 Compute distance from point px,py to each graph


void Draw(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*Draw this multigraph with its current attributes*-*-*-*-*-*-*
*-*                  ==========================================

   Options to draw a graph are described in TGraph::PainGraph

  The drawing option for each TGraph may be specified as an optional
  second argument of the Add function.
  If a draw option is specified, it will be used to draw the graph,
  otherwise the graph will be drawn with the option specified in
  TMultiGraph::Draw

TH1F* GetHistogram() const
    Returns a pointer to the histogram used to draw the axis
    Takes into account the two following cases.
       1- option 'A' was specified in TMultiGraph::Draw. Return fHistogram
       2- user had called TPad::DrawFrame. return pointer to hframe histogram

TAxis* GetXaxis() const
 Get x axis of the graph.

TAxis* GetYaxis() const
 Get y axis of the graph.

void Paint(Option_t *option)
 paint all the graphs of this multigraph

void Print(Option_t *option) const
 Print the list of graphs

void SavePrimitive(ofstream &out, Option_t *option)
 Save primitive as a C++ statement(s) on output stream out

void SetMaximum(Double_t maximum)

void SetMinimum(Double_t minimum)



Inline Functions


             TList* GetListOfGraphs() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
        TMultiGraph TMultiGraph(const TMultiGraph&)


Author: Rene Brun 12/10/2000
Last update: root/graf:$Name: $:$Id: TMultiGraph.cxx,v 1.10 2002/07/15 15:03:38 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.