Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGraph2DAsymmErrors.cxx
Go to the documentation of this file.
1// @(#)root/hist:$Id: TGraph2DAsymmErrors.cxx,v 1.00
2// Author: Olivier Couet
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#include <iostream>
13#include "TBuffer.h"
14#include "TGraph2DAsymmErrors.h"
15#include "TMath.h"
16#include "TH2.h"
17#include "TVirtualPad.h"
18#include "TVirtualFitter.h"
19#include "THLimitsFinder.h"
20
22
23/** \class TGraph2DAsymmErrors
24 \ingroup Graphs
25Graph 2D class with errors.
26
27A TGraph2DAsymmErrors is a TGraph2D with asymmetric errors. It behaves like a TGraph2D and has
28the same drawing options.
29
30The **"ERR"** drawing option allows to display the error bars. The
31following example shows how to use it:
32
33Begin_Macro(source)
34{
35 auto c = new TCanvas("c","TGraph2DAsymmErrors example",0,0,600,600);
36 Double_t P = 6.;
37 Int_t np = 200;
38
39 Double_t *rx=0, *ry=0, *rz=0;
40 Double_t *exl=0, *exh=0, *eyl=0, *eyh=0, *ezl=0, *ezh=0;
41
42 rx = new Double_t[np];
43 ry = new Double_t[np];
44 rz = new Double_t[np];
45 exl = new Double_t[np];
46 exh = new Double_t[np];
47 eyl = new Double_t[np];
48 eyh = new Double_t[np];
49 ezl = new Double_t[np];
50 ezh = new Double_t[np];
51
52 auto r = new TRandom();
53
54 for (Int_t N=0; N<np;N++) {
55 rx[N] = 2*P*(r->Rndm(N))-P;
56 ry[N] = 2*P*(r->Rndm(N))-P;
57 rz[N] = rx[N]*rx[N]-ry[N]*ry[N];
58 rx[N] = 10.+rx[N];
59 ry[N] = 10.+ry[N];
60 rz[N] = 40.+rz[N];
61 exl[N] = r->Rndm(N);
62 exh[N] = r->Rndm(N);
63 eyl[N] = r->Rndm(N);
64 eyh[N] = r->Rndm(N);
65 ezl[N] = 10*r->Rndm(N);
66 ezh[N] = 10*r->Rndm(N);
67 }
68
69 auto g = new TGraph2DAsymmErrors(np, rx, ry, rz, exl, exh, eyl, eyh, ezl, ezh);
70 g->SetTitle("TGraph2D with asymmetric error bars: option \"ERR\"");
71 g->SetFillColor(29);
72 g->SetMarkerSize(0.8);
73 g->SetMarkerStyle(20);
74 g->SetMarkerColor(kRed);
75 g->SetLineColor(kBlue-3);
76 g->SetLineWidth(2);
77 gPad->SetLogy(1);
78 g->Draw("err p0");
79}
80End_Macro
81*/
82
83
84////////////////////////////////////////////////////////////////////////////////
85/// TGraph2DAsymmErrors default constructor
86
88{
89}
90
91
92////////////////////////////////////////////////////////////////////////////////
93/// TGraph2DAsymmErrors normal constructor
94/// the arrays are preset to zero
95
97 : TGraph2D(n)
98{
99 if (n <= 0) {
100 Error("TGraph2DAsymmErrors", "Invalid number of points (%d)", n);
101 return;
102 }
103
104 fEXlow = new Double_t[n];
105 fEXhigh = new Double_t[n];
106 fEYlow = new Double_t[n];
107 fEYhigh = new Double_t[n];
108 fEZlow = new Double_t[n];
109 fEZhigh = new Double_t[n];
110
111 for (Int_t i=0;i<n;i++) {
112 fEXlow[i] = 0;
113 fEXhigh[i] = 0;
114 fEYlow[i] = 0;
115 fEYhigh[i] = 0;
116 fEZlow[i] = 0;
117 fEZhigh[i] = 0;
118 }
119}
120
121
122////////////////////////////////////////////////////////////////////////////////
123/// TGraph2DAsymmErrors constructor with doubles vectors as input.
124
126 :TGraph2D(n, x, y, z)
127{
128 if (n <= 0) {
129 Error("TGraph2DAsymmErrorsErrors", "Invalid number of points (%d)", n);
130 return;
131 }
132
133 fEXlow = new Double_t[n];
134 fEXhigh = new Double_t[n];
135 fEYlow = new Double_t[n];
136 fEYhigh = new Double_t[n];
137 fEZlow = new Double_t[n];
138 fEZhigh = new Double_t[n];
139
140 for (Int_t i=0;i<n;i++) {
141 if (exl) fEXlow[i] = exl[i];
142 else fEXlow[i] = 0;
143 if (exh) fEXhigh[i] = exh[i];
144 else fEXhigh[i] = 0;
145 if (eyl) fEYlow[i] = eyl[i];
146 else fEYlow[i] = 0;
147 if (eyh) fEYhigh[i] = eyh[i];
148 else fEYhigh[i] = 0;
149 if (ezl) fEZlow[i] = ezl[i];
150 else fEZlow[i] = 0;
151 if (ezh) fEZhigh[i] = ezh[i];
152 else fEZhigh[i] = 0;
153 }
154}
155
156
157////////////////////////////////////////////////////////////////////////////////
158/// TGraph2DAsymmErrors destructor.
159
161{
162 delete [] fEXlow;
163 delete [] fEXhigh;
164 delete [] fEYlow;
165 delete [] fEYhigh;
166 delete [] fEZlow;
167 delete [] fEZhigh;
168}
169
170////////////////////////////////////////////////////////////////////////////////
171/// Copy constructor.
172/// Copy everything except list of functions
173
175: TGraph2D(g), fEXlow(0), fEXhigh(0), fEYlow(0), fEYhigh(0), fEZlow(0), fEZhigh(0)
176{
177 if (fSize > 0) {
178 fEXlow = new Double_t[fSize];
179 fEXhigh = new Double_t[fSize];
180 fEYlow = new Double_t[fSize];
181 fEYhigh = new Double_t[fSize];
182 fEZlow = new Double_t[fSize];
183 fEZhigh = new Double_t[fSize];
184 for (Int_t n = 0; n < fSize; n++) {
185 fEXlow[n] = g.fEXlow[n];
186 fEXhigh[n] = g.fEXhigh[n];
187 fEYlow[n] = g.fEYlow[n];
188 fEYhigh[n] = g.fEYhigh[n];
189 fEZlow[n] = g.fEZlow[n];
190 fEZhigh[n] = g.fEZhigh[n];
191 }
192 }
193}
194
195////////////////////////////////////////////////////////////////////////////////
196/// Assignment operator
197/// Copy everything except list of functions
198
200{
201 if (this == &g) return *this;
202
203 // call operator= on TGraph2D
204 this->TGraph2D::operator=(static_cast<const TGraph2D&>(g) );
205
206 // delete before existing contained objects
207 if (fEXlow) delete [] fEXlow;
208 if (fEXhigh) delete [] fEXhigh;
209 if (fEYlow) delete [] fEYlow;
210 if (fEYhigh) delete [] fEYhigh;
211 if (fEZlow) delete [] fEZlow;
212 if (fEZhigh) delete [] fEZhigh;
213
214 fEXlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
215 fEXhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
216 fEYlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
217 fEYhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
218 fEZlow = (fSize > 0) ? new Double_t[fSize] : nullptr;
219 fEZhigh = (fSize > 0) ? new Double_t[fSize] : nullptr;
220
221
222 // copy error arrays
223 for (Int_t n = 0; n < fSize; n++) {
224 fEXlow[n] = g.fEXlow[n];
225 fEXhigh[n] = g.fEXhigh[n];
226 fEYlow[n] = g.fEYlow[n];
227 fEYhigh[n] = g.fEYhigh[n];
228 fEZlow[n] = g.fEZlow[n];
229 fEZhigh[n] = g.fEZhigh[n];
230 }
231 return *this;
232}
233
234////////////////////////////////////////////////////////////////////////////////
235/// Returns the combined error along X at point i by computing the average
236/// of the lower and upper variance.
237
239{
240 if (i < 0 || i >= fNpoints) return -1;
241 if (!fEXlow && !fEXhigh) return -1;
242 Double_t elow=0, ehigh=0;
243 if (fEXlow) elow = fEXlow[i];
244 if (fEXhigh) ehigh = fEXhigh[i];
245 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
246}
247
248////////////////////////////////////////////////////////////////////////////////
249/// Returns the low error along X at point i.
250
252{
253 if (i < 0 || i >= fNpoints) return -1;
254 if (fEXlow) return fEXlow[i];
255 return -1;
256}
257
258////////////////////////////////////////////////////////////////////////////////
259/// Returns the high error along X at point i.
260
262{
263 if (i < 0 || i >= fNpoints) return -1;
264 if (fEXhigh) return fEXhigh[i];
265 return -1;
266}
267
268////////////////////////////////////////////////////////////////////////////////
269/// Returns the combined error along Y at point i by computing the average
270/// of the lower and upper variance.
271
273{
274 if (i < 0 || i >= fNpoints) return -1;
275 if (!fEYlow && !fEYhigh) return -1;
276 Double_t elow=0, ehigh=0;
277 if (fEYlow) elow = fEYlow[i];
278 if (fEYhigh) ehigh = fEYhigh[i];
279 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
280}
281
282
283////////////////////////////////////////////////////////////////////////////////
284/// Returns the low error along Y at point i.
285
287{
288 if (i < 0 || i >= fNpoints) return -1;
289 if (fEYlow) return fEYlow[i];
290 return -1;
291}
292
293////////////////////////////////////////////////////////////////////////////////
294/// Returns the high error along Y at point i.
295
297{
298 if (i < 0 || i >= fNpoints) return -1;
299 if (fEYhigh) return fEYhigh[i];
300 return -1;
301}
302
303////////////////////////////////////////////////////////////////////////////////
304/// Returns the combined error along Z at point i by computing the average
305/// of the lower and upper variance.
306
308{
309 if (i < 0 || i >= fNpoints) return -1;
310 if (!fEZlow && !fEZhigh) return -1;
311 Double_t elow=0, ehigh=0;
312 if (fEZlow) elow = fEZlow[i];
313 if (fEZhigh) ehigh = fEZhigh[i];
314 return TMath::Sqrt(0.5*(elow*elow + ehigh*ehigh));
315}
316
317////////////////////////////////////////////////////////////////////////////////
318/// Returns the low error along Z at point i.
319
321{
322 if (i < 0 || i >= fNpoints) return -1;
323 if (fEZlow) return fEZlow[i];
324 return -1;
325}
326
327////////////////////////////////////////////////////////////////////////////////
328/// Returns the high error along Z at point i.
329
331{
332 if (i < 0 || i >= fNpoints) return -1;
333 if (fEZhigh) return fEZhigh[i];
334 return -1;
335}
336
337
338////////////////////////////////////////////////////////////////////////////////
339/// Returns the X maximum with errors.
340
342{
343 Double_t v = fX[0]+fEXhigh[0];
344 for (Int_t i=1; i<fNpoints; i++) if (fX[i]+fEXhigh[i]>v) v=fX[i]+fEXhigh[i];
345 return v;
346}
347
348
349////////////////////////////////////////////////////////////////////////////////
350/// Returns the X minimum with errors.
351
353{
354 Double_t v = fX[0]-fEXlow[0];
355 for (Int_t i=1; i<fNpoints; i++) if (fX[i]-fEXlow[i]<v) v=fX[i]-fEXlow[i];
356 return v;
357}
358
359
360////////////////////////////////////////////////////////////////////////////////
361/// Returns the Y maximum with errors.
362
364{
365 Double_t v = fY[0]+fEYhigh[0];
366 for (Int_t i=1; i<fNpoints; i++) if (fY[i]+fEYhigh[i]>v) v=fY[i]+fEYhigh[i];
367 return v;
368}
369
370
371////////////////////////////////////////////////////////////////////////////////
372/// Returns the Y minimum with errors.
373
375{
376 Double_t v = fY[0]-fEYlow[0];
377 for (Int_t i=1; i<fNpoints; i++) if (fY[i]-fEYlow[i]<v) v=fY[i]-fEYlow[i];
378 return v;
379}
380
381
382////////////////////////////////////////////////////////////////////////////////
383/// Returns the Z maximum with errors.
384
386{
387 Double_t v = fZ[0]+fEZhigh[0];
388 for (Int_t i=1; i<fNpoints; i++) if (fZ[i]+fEZhigh[i]>v) v=fZ[i]+fEZhigh[i];
389 return v;
390}
391
392
393////////////////////////////////////////////////////////////////////////////////
394/// Returns the Z minimum with errors.
395
397{
398 Double_t v = fZ[0]-fEZlow[0];
399 for (Int_t i=1; i<fNpoints; i++) if (fZ[i]-fEZlow[i]<v) v=fZ[i]-fEZlow[i];
400 return v;
401}
402
403
404////////////////////////////////////////////////////////////////////////////////
405/// Print 2D graph and errors values.
406
408{
409 for (Int_t i = 0; i < fNpoints; i++) {
410 printf("x[%d]=%g, y[%d]=%g, z[%d]=%g, exl[%d]=%g, exh[%d]=%g, eyl[%d]=%g, eyh[%d]=%g, ezl[%d]=%g, ezh[%d]=%g\n",
411 i, fX[i], i, fY[i], i, fZ[i], i, fEXlow[i], i, fEXhigh[i], i, fEYlow[i], i, fEYhigh[i], i, fEZlow[i], i, fEZhigh[i]);
412 }
413}
414
415////////////////////////////////////////////////////////////////////////////////
416/// Multiply the values and errors of a TGraph2DAsymmErrors by a constant c1.
417///
418/// If option contains "x" the x values and errors are scaled
419/// If option contains "y" the y values and errors are scaled
420/// If option contains "z" the z values and errors are scaled
421/// If option contains "xyz" all three x, y and z values and errors are scaled
422
424{
426 TString opt = option; opt.ToLower();
427 if (opt.Contains("x") && GetEXlow()) {
428 for (Int_t i=0; i<GetN(); i++)
429 GetEXlow()[i] *= c1;
430 }
431 if (opt.Contains("x") && GetEXhigh()) {
432 for (Int_t i=0; i<GetN(); i++)
433 GetEXhigh()[i] *= c1;
434 }
435 if (opt.Contains("y") && GetEYlow()) {
436 for (Int_t i=0; i<GetN(); i++)
437 GetEYlow()[i] *= c1;
438 }
439 if (opt.Contains("y") && GetEYhigh()) {
440 for (Int_t i=0; i<GetN(); i++)
441 GetEYhigh()[i] *= c1;
442 }
443 if (opt.Contains("z") && GetEZlow()) {
444 for (Int_t i=0; i<GetN(); i++)
445 GetEZlow()[i] *= c1;
446 }
447 if (opt.Contains("z") && GetEZhigh()) {
448 for (Int_t i=0; i<GetN(); i++)
449 GetEZhigh()[i] *= c1;
450 }
451}
452
453////////////////////////////////////////////////////////////////////////////////
454/// Set number of points in the 2D graph.
455/// Existing coordinates are preserved.
456/// New coordinates above fNpoints are preset to 0.
457
459{
460 if (n < 0) n = 0;
461 if (n == fNpoints) return;
462 if (n > fNpoints) SetPointError(n,0,0,0,0,0,0);
463 fNpoints = n;
464}
465
466////////////////////////////////////////////////////////////////////////////////
467/// Deletes point number ipoint
468
470{
471 if (ipoint < 0) return -1;
472 if (ipoint >= fNpoints) return -1;
473
474 fNpoints--;
475 Double_t *newX = new Double_t[fNpoints];
476 Double_t *newY = new Double_t[fNpoints];
477 Double_t *newZ = new Double_t[fNpoints];
478 Double_t *newEXlow = new Double_t[fNpoints];
479 Double_t *newEXhigh = new Double_t[fNpoints];
480 Double_t *newEYlow = new Double_t[fNpoints];
481 Double_t *newEYhigh = new Double_t[fNpoints];
482 Double_t *newEZlow = new Double_t[fNpoints];
483 Double_t *newEZhigh = new Double_t[fNpoints];
484
485 Int_t j = -1;
486 for (Int_t i = 0; i < fNpoints + 1; i++) {
487 if (i == ipoint) continue;
488 j++;
489 newX[j] = fX[i];
490 newY[j] = fY[i];
491 newZ[j] = fZ[i];
492 newEXlow[j] = fEXlow[i];
493 newEXhigh[j] = fEXhigh[i];
494 newEYlow[j] = fEYlow[i];
495 newEYhigh[j] = fEYhigh[i];
496 newEZlow[j] = fEZlow[i];
497 newEZhigh[j] = fEZhigh[i];
498 }
499 delete [] fX;
500 delete [] fY;
501 delete [] fZ;
502 delete [] fEXlow;
503 delete [] fEXhigh;
504 delete [] fEYlow;
505 delete [] fEYhigh;
506 delete [] fEZlow;
507 delete [] fEZhigh;
508 fX = newX;
509 fY = newY;
510 fZ = newZ;
511 fEXlow = newEXlow;
512 fEXhigh = newEXhigh;
513 fEYlow = newEYlow;
514 fEYhigh = newEYhigh;
515 fEZlow = newEZlow;
516 fEZhigh = newEZhigh;
517 fSize = fNpoints;
518 if (fHistogram) {
519 delete fHistogram;
520 fHistogram = nullptr;
521 fDelaunay = nullptr;
522 }
523 return ipoint;
524}
525
526////////////////////////////////////////////////////////////////////////////////
527/// Set x, y and z values for point number i
528
530{
531 if (i < 0) return;
532 if (i >= fNpoints) {
533 // re-allocate the object
534 Double_t *savex = new Double_t[i+1];
535 Double_t *savey = new Double_t[i+1];
536 Double_t *savez = new Double_t[i+1];
537 Double_t *saveexl = new Double_t[i+1];
538 Double_t *saveexh = new Double_t[i+1];
539 Double_t *saveeyl = new Double_t[i+1];
540 Double_t *saveeyh = new Double_t[i+1];
541 Double_t *saveezl = new Double_t[i+1];
542 Double_t *saveezh = new Double_t[i+1];
543 if (fNpoints > 0) {
544 memcpy(savex, fX, fNpoints*sizeof(Double_t));
545 memcpy(savey, fY, fNpoints*sizeof(Double_t));
546 memcpy(savez, fZ, fNpoints*sizeof(Double_t));
547 memcpy(saveexl,fEXlow, fNpoints*sizeof(Double_t));
548 memcpy(saveexh,fEXhigh,fNpoints*sizeof(Double_t));
549 memcpy(saveeyl,fEYlow, fNpoints*sizeof(Double_t));
550 memcpy(saveeyh,fEYhigh,fNpoints*sizeof(Double_t));
551 memcpy(saveezl,fEZlow, fNpoints*sizeof(Double_t));
552 memcpy(saveezh,fEZhigh,fNpoints*sizeof(Double_t));
553 }
554 if (fX) delete [] fX;
555 if (fY) delete [] fY;
556 if (fZ) delete [] fZ;
557 if (fEXlow) delete [] fEXlow;
558 if (fEXhigh) delete [] fEXhigh;
559 if (fEYlow) delete [] fEYlow;
560 if (fEYhigh) delete [] fEYhigh;
561 if (fEZlow) delete [] fEZlow;
562 if (fEZhigh) delete [] fEZhigh;
563 fX = savex;
564 fY = savey;
565 fZ = savez;
566 fEXlow = saveexl;
567 fEXhigh = saveexh;
568 fEYlow = saveeyl;
569 fEYhigh = saveeyh;
570 fEZlow = saveezl;
571 fEZhigh = saveezh;
572 fNpoints = i+1;
573 }
574 fX[i] = x;
575 fY[i] = y;
576 fZ[i] = z;
577}
578
579
580////////////////////////////////////////////////////////////////////////////////
581/// Set ex, ey and ez values for point number i
582
584{
585 if (i < 0) return;
586 if (i >= fNpoints) {
587 // re-allocate the object
589 }
590 fEXlow[i] = exl;
591 fEXhigh[i] = exh;
592 fEYlow[i] = eyl;
593 fEYhigh[i] = eyh;
594 fEZlow[i] = ezl;
595 fEZhigh[i] = ezh;
596}
597
598
599////////////////////////////////////////////////////////////////////////////////
600/// Stream an object of class TGraph2DAsymmErrors.
601
603{
604 if (b.IsReading()) {
605 UInt_t R__s, R__c;
606 Version_t R__v = b.ReadVersion(&R__s, &R__c);
607 b.ReadClassBuffer(TGraph2DAsymmErrors::Class(), this, R__v, R__s, R__c);
608 } else {
609 b.WriteClassBuffer(TGraph2DAsymmErrors::Class(),this);
610 }
611}
#define b(i)
Definition RSha256.hxx:100
#define g(i)
Definition RSha256.hxx:105
short Version_t
Definition RtypesCore.h:65
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:377
Option_t Option_t option
Buffer base class used for serializing objects.
Definition TBuffer.h:43
Graph 2D class with errors.
Double_t GetErrorY(Int_t bin) const override
Returns the combined error along Y at point i by computing the average of the lower and upper varianc...
Double_t * GetEYlow() const override
Double_t * fEYlow
[fNpoints] array of Y low errors
Double_t GetYminE() const override
Returns the Y minimum with errors.
Double_t GetErrorZlow(Int_t i) const
Returns the low error along Z at point i.
virtual void SetPointError(Int_t i, Double_t exl, Double_t exh, Double_t eyl, Double_t eyh, Double_t ezl, Double_t ezh)
Set ex, ey and ez values for point number i.
Double_t * GetEYhigh() const override
Double_t * fEZlow
[fNpoints] array of Z low errors
Double_t GetErrorZhigh(Int_t i) const
Returns the high error along Z at point i.
Double_t GetYmaxE() const override
Returns the Y maximum with errors.
Double_t * fEXlow
[fNpoints] array of X low errors
Double_t GetErrorZ(Int_t bin) const override
Returns the combined error along Z at point i by computing the average of the lower and upper varianc...
Double_t GetErrorYlow(Int_t i) const
Returns the low error along Y at point i.
Double_t GetZmaxE() const override
Returns the Z maximum with errors.
Double_t * GetEZhigh() const override
Double_t * fEXhigh
[fNpoints] array of X high errors
Int_t RemovePoint(Int_t ipoint)
Deletes point number ipoint.
Double_t * fEZhigh
[fNpoints] array of Z high errors
Double_t * GetEXhigh() const override
Double_t * GetEZlow() const override
Double_t * fEYhigh
[fNpoints] array of Y high errors
Double_t GetErrorX(Int_t bin) const override
Returns the combined error along X at point i by computing the average of the lower and upper varianc...
Double_t GetErrorXhigh(Int_t i) const
Returns the high error along X at point i.
void Streamer(TBuffer &) override
Stream an object of class TGraph2DAsymmErrors.
Double_t GetErrorYhigh(Int_t i) const
Returns the high error along Y at point i.
Double_t GetErrorXlow(Int_t i) const
Returns the low error along X at point i.
void Set(Int_t n) override
Set number of points in the 2D graph.
void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z) override
Set x, y and z values for point number i.
TGraph2DAsymmErrors()
TGraph2DAsymmErrors default constructor.
Double_t GetXminE() const override
Returns the X minimum with errors.
void Print(Option_t *chopt="") const override
Print 2D graph and errors values.
void Scale(Double_t c1=1., Option_t *option="z") override
Multiply the values and errors of a TGraph2DAsymmErrors by a constant c1.
Double_t GetXmaxE() const override
Returns the X maximum with errors.
TGraph2DAsymmErrors & operator=(const TGraph2DAsymmErrors &)
Assignment operator Copy everything except list of functions.
Double_t GetZminE() const override
Returns the Z minimum with errors.
Double_t * GetEXlow() const override
static TClass * Class()
~TGraph2DAsymmErrors() override
TGraph2DAsymmErrors destructor.
Graphics object made of three arrays X, Y and Z with the same number of points each.
Definition TGraph2D.h:41
Int_t fNpoints
Number of points in the data set.
Definition TGraph2D.h:45
Double_t * fZ
[fNpoints]
Definition TGraph2D.h:52
TH2D * fHistogram
!2D histogram of z values linearly interpolated on the triangles
Definition TGraph2D.h:58
TObject * fDelaunay
! Pointer to Delaunay interpolator object
Definition TGraph2D.h:59
Int_t GetN() const
Definition TGraph2D.h:120
TGraph2D & operator=(const TGraph2D &)
Graph2D operator "=".
Definition TGraph2D.cxx:565
Double_t * fX
[fNpoints]
Definition TGraph2D.h:50
Double_t * fY
[fNpoints] Data set to be plotted
Definition TGraph2D.h:51
virtual void Scale(Double_t c1=1., Option_t *option="z")
Multiply the values of a TGraph2D by a constant c1.
Int_t fSize
!Real size of fX, fY and fZ
Definition TGraph2D.h:49
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:970
Basic string class.
Definition TString.h:139
void ToLower()
Change string to lower-case.
Definition TString.cxx:1170
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:636
Double_t y[n]
Definition legend1.C:17
return c1
Definition legend1.C:41
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Double_t Sqrt(Double_t x)
Returns the square root of x.
Definition TMath.h:660