Logo ROOT  
Reference Guide
TGraph2DPainter.h
Go to the documentation of this file.
1 // @(#)root/histpainter:$Id: TGraph2DPainter.h,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 #ifndef ROOT_TGraph2DPainter
13 #define ROOT_TGraph2DPainter
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGraph2DPainter //
19 // //
20 // helper class to draw 2D graphs //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TObject.h"
25 
26 class TGraph2D;
27 class TGraphDelaunay;
28 class TGraphDelaunay2D;
29 class TList;
30 
31 class TGraph2DPainter : public TObject {
32 
33 protected:
34 
35  Double_t *fX; //!Pointer to fGraph2D->fX
36  Double_t *fY; //!Pointer to fGraph2D->fY
37  Double_t *fZ; //!Pointer to fGraph2D->fZ
38  Double_t *fXN; //!Pointer to fDelaunay->fXN
39  Double_t *fYN; //!Pointer to fDelaunay->fYN
40  Double_t *fEX; //!Pointer to fGraph2D->fXE
41  Double_t *fEY; //!Pointer to fGraph2D->fYE
42  Double_t *fEZ; //!Pointer to fGraph2D->fZE
43  Double_t fXNmin; //!Equal to fDelaunay->fXNmin
44  Double_t fXNmax; //!Equal to fDelaunay->fXNmax
45  Double_t fYNmin; //!Equal to fDelaunay->fYNmin
46  Double_t fYNmax; //!Equal to fDelaunay->fYNmax
49  Double_t fYmin; //! fGraph2D->fHistogram limits
53  Int_t fNpoints; //!Equal to fGraph2D->fNpoints
54  Int_t fNdt; //!Equal to fDelaunay->fNdt
55  Int_t *fPTried; //!Pointer to fDelaunay->fPTried
56  Int_t *fNTried; //!Pointer to fDelaunay->fNTried
57  Int_t *fMTried; //!Pointer to fDelaunay->fMTried
58 
59 
60  TGraphDelaunay *fDelaunay; //! Pointer to the TGraphDelaunay2D to be painted
61  TGraphDelaunay2D *fDelaunay2D; //! Pointer to the TGraphDelaunay2D to be painted
62  TGraph2D *fGraph2D; //! Pointer to the TGraph2D in fDelaunay
63 
64  void FindTriangles();
65  void PaintLevels(Int_t *v, Double_t *x, Double_t *y, Int_t nblev=0, Double_t *glev=0);
67 
68  void PaintTriangles_old(Option_t *option);
69  void PaintTriangles_new(Option_t *option);
70 
71 public:
72 
76 
77  virtual ~TGraph2DPainter();
78 
79  TList *GetContourList(Double_t contour);
80  void Paint(Option_t *option);
81  void PaintContour(Option_t *option);
82  void PaintErrors(Option_t *option);
83  void PaintPolyMarker(Option_t *option);
84  void PaintPolyLine(Option_t *option);
85  void PaintTriangles(Option_t *option);
86 
87  ClassDef(TGraph2DPainter,0) // TGraph2D painter
88 };
89 
90 #endif
n
const Int_t n
Definition: legend1.C:16
TGraph2DPainter::fXNmin
Double_t fXNmin
Pointer to fGraph2D->fZE.
Definition: TGraph2DPainter.h:43
Option_t
const char Option_t
Definition: RtypesCore.h:66
TGraph2DPainter::fYN
Double_t * fYN
Pointer to fDelaunay->fXN.
Definition: TGraph2DPainter.h:39
TGraph2DPainter::GetContourList
TList * GetContourList(Double_t contour)
Returns the X and Y graphs building a contour.
Definition: TGraph2DPainter.cxx:188
TGraph2DPainter::PaintContour
void PaintContour(Option_t *option)
Paints the 2D graph as a contour plot.
Definition: TGraph2DPainter.cxx:549
TGraphDelaunay2D
TGraphDelaunay2D generates a Delaunay triangulation of a TGraph2D.
Definition: TGraphDelaunay2D.h:32
TGraph2DPainter::PaintTriangles_new
void PaintTriangles_new(Option_t *option)
Paints the 2D graph as triangles (new implementation)
Definition: TGraph2DPainter.cxx:1230
x
Double_t x[n]
Definition: legend1.C:17
TGraph2DPainter::PaintPolyMarker0
void PaintPolyMarker0(Int_t n, Double_t *x, Double_t *y)
Paints a circle at each vertex. Each circle background is white.
Definition: TGraph2DPainter.cxx:1041
TGraph2DPainter::fEY
Double_t * fEY
Pointer to fGraph2D->fXE.
Definition: TGraph2DPainter.h:41
TGraph2DPainter::fGraph2D
TGraph2D * fGraph2D
Pointer to the TGraphDelaunay2D to be painted.
Definition: TGraph2DPainter.h:62
TGraph2DPainter::fNdt
Int_t fNdt
Equal to fGraph2D->fNpoints.
Definition: TGraph2DPainter.h:54
TGraph2DPainter::~TGraph2DPainter
virtual ~TGraph2DPainter()
TGraph2DPainter destructor.
Definition: TGraph2DPainter.cxx:148
TGraph2DPainter::PaintErrors
void PaintErrors(Option_t *option)
Paints the 2D graph as error bars.
Definition: TGraph2DPainter.cxx:591
TGraph2DPainter::PaintTriangles_old
void PaintTriangles_old(Option_t *option)
Paints the 2D graph as triangles (old implementation)
Definition: TGraph2DPainter.cxx:1075
v
@ v
Definition: rootcling_impl.cxx:3635
TGraph2DPainter::fZ
Double_t * fZ
Pointer to fGraph2D->fY.
Definition: TGraph2DPainter.h:37
TGraph2DPainter::PaintPolyMarker
void PaintPolyMarker(Option_t *option)
Paints the 2D graph as PaintPolyMarker.
Definition: TGraph2DPainter.cxx:890
TGraph2DPainter::fYNmax
Double_t fYNmax
Equal to fDelaunay->fYNmin.
Definition: TGraph2DPainter.h:46
TGraph2DPainter::fNTried
Int_t * fNTried
Pointer to fDelaunay->fPTried.
Definition: TGraph2DPainter.h:56
TGraph2DPainter::fDelaunay
TGraphDelaunay * fDelaunay
Pointer to fDelaunay->fMTried.
Definition: TGraph2DPainter.h:60
TGraph2DPainter::fEX
Double_t * fEX
Pointer to fDelaunay->fYN.
Definition: TGraph2DPainter.h:40
TGraph2DPainter::fPTried
Int_t * fPTried
Equal to fDelaunay->fNdt.
Definition: TGraph2DPainter.h:55
TGraph2DPainter::fDelaunay2D
TGraphDelaunay2D * fDelaunay2D
Pointer to the TGraphDelaunay2D to be painted.
Definition: TGraph2DPainter.h:61
TGraph2D
Graphics object made of three arrays X, Y and Z with the same number of points each.
Definition: TGraph2D.h:41
TGraph2DPainter::fXmin
Double_t fXmin
Equal to fDelaunay->fYNmax.
Definition: TGraph2DPainter.h:47
TGraph2DPainter::fXNmax
Double_t fXNmax
Equal to fDelaunay->fXNmin.
Definition: TGraph2DPainter.h:44
TGraph2DPainter::PaintTriangles
void PaintTriangles(Option_t *option)
Paints the 2D graph as triangles.
Definition: TGraph2DPainter.cxx:1063
TGraph2DPainter::fYmin
Double_t fYmin
Definition: TGraph2DPainter.h:49
TGraphDelaunay
TGraphDelaunay generates a Delaunay triangulation of a TGraph2D.
Definition: TGraphDelaunay.h:30
TGraph2DPainter::fX
Double_t * fX
Definition: TGraph2DPainter.h:35
TGraph2DPainter::TGraph2DPainter
TGraph2DPainter()
TGraph2DPainter default constructor.
Definition: TGraph2DPainter.cxx:47
TGraph2DPainter::fZmax
Double_t fZmax
Definition: TGraph2DPainter.h:52
TGraph2DPainter::fYmax
Double_t fYmax
fGraph2D->fHistogram limits
Definition: TGraph2DPainter.h:50
TGraph2DPainter::FindTriangles
void FindTriangles()
Pointer to the TGraph2D in fDelaunay.
Definition: TGraph2DPainter.cxx:157
TGraph2DPainter::fXmax
Double_t fXmax
Definition: TGraph2DPainter.h:48
y
Double_t y[n]
Definition: legend1.C:17
TGraph2DPainter::fY
Double_t * fY
Pointer to fGraph2D->fX.
Definition: TGraph2DPainter.h:36
TGraph2DPainter::PaintPolyLine
void PaintPolyLine(Option_t *option)
Paints the 2D graph as PaintPolyLine.
Definition: TGraph2DPainter.cxx:990
TGraph2DPainter::fXN
Double_t * fXN
Pointer to fGraph2D->fZ.
Definition: TGraph2DPainter.h:38
TGraph2DPainter::fZmin
Double_t fZmin
Definition: TGraph2DPainter.h:51
Double_t
double Double_t
Definition: RtypesCore.h:59
TObject.h
TGraph2DPainter::Paint
void Paint(Option_t *option)
Paint a TGraphDelaunay according to the value of "option":
Definition: TGraph2DPainter.cxx:504
TGraph2DPainter::fMTried
Int_t * fMTried
Pointer to fDelaunay->fNTried.
Definition: TGraph2DPainter.h:57
TGraph2DPainter::fYNmin
Double_t fYNmin
Equal to fDelaunay->fXNmax.
Definition: TGraph2DPainter.h:45
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGraph2DPainter::fEZ
Double_t * fEZ
Pointer to fGraph2D->fYE.
Definition: TGraph2DPainter.h:42
TGraph2DPainter
The TGraphDelaunay painting class.
Definition: TGraph2DPainter.h:31
TGraph2DPainter::PaintLevels
void PaintLevels(Int_t *v, Double_t *x, Double_t *y, Int_t nblev=0, Double_t *glev=0)
Paints one triangle.
Definition: TGraph2DPainter.cxx:696
TGraph2DPainter::fNpoints
Int_t fNpoints
Definition: TGraph2DPainter.h:53
TList
A doubly linked list.
Definition: TList.h:44
int