Skip to content
Snippets Groups Projects
Commit 9421e34c authored by Olivier Couet's avatar Olivier Couet
Browse files

The `TGraph` copy constructor also copy the underlying `TH1F` if it exists (it...

The `TGraph` copy constructor also copy the underlying `TH1F` if it exists (it holds the axis titles).
parent 73b01c75
No related branches found
No related tags found
No related merge requests found
......@@ -173,7 +173,8 @@ The following interfaces have been removed, after deprecation in v6.08.
- The "BOX" option, to draw 3D histograms, has been reimplemented by Evgueni Tcherniaev
The following picture show the old and new version
- `ChangeLabel` is now available for log axis as well as requested [here](https://sft.its.cern.ch/jira/browse/ROOT-8537).
- The `TGraph` copy constructor also copy the underlying `TH1F` if it exists (it
holds the axis titles).
![New box option for 3D histograms](NewBoxOption.png)
......
......@@ -157,9 +157,6 @@ TGraph::TGraph(Int_t n, const Double_t *x, const Double_t *y)
////////////////////////////////////////////////////////////////////////////////
/// Copy constructor for this graph
///
/// This copy constructor does not copy the underlying histogram. Basic informations
/// attached to it (like axis titles) will be lost after a copy.
TGraph::TGraph(const TGraph &gr)
: TNamed(gr), TAttLine(gr), TAttFill(gr), TAttMarker(gr)
......@@ -168,7 +165,8 @@ TGraph::TGraph(const TGraph &gr)
fMaxSize = gr.fMaxSize;
if (gr.fFunctions) fFunctions = (TList*)gr.fFunctions->Clone();
else fFunctions = new TList;
fHistogram = 0;
if (gr.fHistogram) fHistogram = (TH1F*)gr.fHistogram->Clone();
else fHistogram = 0;
fMinimum = gr.fMinimum;
fMaximum = gr.fMaximum;
if (!fMaxSize) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment