TMultiGraph
class description - source file - inheritance tree
public:
TMultiGraph()
TMultiGraph(const char* name, const char* title)
TMultiGraph(const TMultiGraph&)
virtual ~TMultiGraph()
virtual void Add(TGraph* graph, const Option_t* chopt)
virtual void Browse(TBrowser* b)
static TClass* Class()
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void Draw(const Option_t* chopt)
TH1F* GetHistogram() const
TList* GetListOfGraphs() const
TAxis* GetXaxis() const
TAxis* GetYaxis() const
virtual TClass* IsA() const
virtual void Paint(const Option_t* chopt)
virtual void Print(const Option_t* chopt) const
virtual void RecursiveRemove(TObject* obj)
virtual void SavePrimitive(ofstream& out, const 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)
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
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
note that the graph is now owned by the TMultigraph.
Deleting the TMultiGraph object will automatically delete the graphs.
You should not delete the graphs when the TMultigraph is still active.
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 RecursiveRemove(TObject *obj)
Recursively remove this object from a list. Typically implemented
by classes that can contain mulitple references to a same object.
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.12 2003/05/16 13:12:07 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.