| 27 |
|
|
| 28 |
|
|
| 29 |
//______________________________________________________________________________ |
//______________________________________________________________________________ |
| 30 |
// |
/* Begin_Html |
| 31 |
// A TMultiGraph is a collection of TGraph (or derived) objects |
<center><h2>TMultiGraph class</h2></center> |
| 32 |
// Use TMultiGraph::Add to add a new graph to the list. |
A TMultiGraph is a collection of TGraph (or derived) objects |
| 33 |
// The TMultiGraph owns the objects in the list. |
Use <tt>TMultiGraph::Add</tt> to add a new graph to the list. |
| 34 |
// Drawing options are the same as for TGraph |
The TMultiGraph owns the objects in the list. |
| 35 |
// Example; |
Drawing options are the same as for TGraph. |
| 36 |
// TGraph *gr1 = new TGraph(... |
<p> |
| 37 |
// TGraphErrors *gr2 = new TGraphErrors(... |
Example: |
| 38 |
// TMultiGraph *mg = new TMultiGraph(); |
<pre> |
| 39 |
// mg->Add(gr1,"lp"); |
TGraph *gr1 = new TGraph(... |
| 40 |
// mg->Add(gr2,"cp"); |
TGraphErrors *gr2 = new TGraphErrors(... |
| 41 |
// mg->Draw("a"); |
TMultiGraph *mg = new TMultiGraph(); |
| 42 |
// |
mg->Add(gr1,"lp"); |
| 43 |
// The drawing option for each TGraph may be specified as an optional |
mg->Add(gr2,"cp"); |
| 44 |
// second argument of the Add function. |
mg->Draw("a"); |
| 45 |
// If a draw option is specified, it will be used to draw the graph, |
</pre> |
| 46 |
// otherwise the graph will be drawn with the option specified in |
The drawing option for each TGraph may be specified as an optional |
| 47 |
// TMultiGraph::Draw |
second argument of the Add function. |
| 48 |
|
If a draw option is specified, it will be used to draw the graph, |
| 49 |
|
otherwise the graph will be drawn with the option specified in |
| 50 |
|
<tt>TMultiGraph::Draw</tt>. |
| 51 |
|
End_Html */ |
| 52 |
|
|
| 53 |
|
|
| 54 |
//______________________________________________________________________________ |
//______________________________________________________________________________ |
| 1208 |
|
|
| 1209 |
while (lnk) { |
while (lnk) { |
| 1210 |
g = lnk->GetObject(); |
g = lnk->GetObject(); |
| 1211 |
g->SavePrimitive(out,"multigraph"); |
g->SavePrimitive(out, Form("multigraph%s",lnk->GetOption())); |
| 1212 |
lnk = (TObjOptLink*)lnk->Next(); |
lnk = (TObjOptLink*)lnk->Next(); |
|
|
|
| 1213 |
} |
} |
| 1214 |
} |
} |
| 1215 |
out<<" multigraph->Draw(" |
out<<" multigraph->Draw(" <<quote<<option<<quote<<");"<<endl; |
|
<<quote<<option<<quote<<");"<<endl; |
|
| 1216 |
|
|
| 1217 |
TAxis *xaxis = GetXaxis(); |
TAxis *xaxis = GetXaxis(); |
| 1218 |
TAxis *yaxis = GetYaxis(); |
TAxis *yaxis = GetYaxis(); |