ROOT  6.06/09
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 #ifndef ROOT_Object
25 #include "TObject.h"
26 #endif
27 
28 class TGraph2D;
29 class TGraphDelaunay;
30 class TGraphDelaunay2D;
31 class TList;
32 
33 class TGraph2DPainter : public TObject {
34 
35 protected:
36 
37  Double_t *fX; //!Pointer to fGraph2D->fX
38  Double_t *fY; //!Pointer to fGraph2D->fY
39  Double_t *fZ; //!Pointer to fGraph2D->fZ
40  Double_t *fXN; //!Pointer to fDelaunay->fXN
41  Double_t *fYN; //!Pointer to fDelaunay->fYN
42  Double_t *fEX; //!Pointer to fGraph2D->fXE
43  Double_t *fEY; //!Pointer to fGraph2D->fYE
44  Double_t *fEZ; //!Pointer to fGraph2D->fZE
45  Double_t fXNmin; //!Equal to fDelaunay->fXNmin
46  Double_t fXNmax; //!Equal to fDelaunay->fXNmax
47  Double_t fYNmin; //!Equal to fDelaunay->fYNmin
48  Double_t fYNmax; //!Equal to fDelaunay->fYNmax
51  Double_t fYmin; //! fGraph2D->fHistogram limits
55  Int_t fNpoints; //!Equal to fGraph2D->fNpoints
56  Int_t fNdt; //!Equal to fDelaunay->fNdt
57  Int_t *fPTried; //!Pointer to fDelaunay->fPTried
58  Int_t *fNTried; //!Pointer to fDelaunay->fNTried
59  Int_t *fMTried; //!Pointer to fDelaunay->fMTried
60 
61 
62  TGraphDelaunay *fDelaunay; // Pointer to the TGraphDelaunay2D to be painted
63  TGraphDelaunay2D *fDelaunay2D; // Pointer to the TGraphDelaunay2D to be painted
64  TGraph2D *fGraph2D; // Pointer to the TGraph2D in fDelaunay
65 
66  void FindTriangles();
67  void PaintLevels(Int_t *v, Double_t *x, Double_t *y, Int_t nblev=0, Double_t *glev=0);
69 
70  void PaintTriangles_old(Option_t *option);
71  void PaintTriangles_new(Option_t *option);
72 
73 public:
74 
78 
79  virtual ~TGraph2DPainter();
80 
81  TList *GetContourList(Double_t contour);
82  void Paint(Option_t *option);
83  void PaintContour(Option_t *option);
84  void PaintErrors(Option_t *option);
85  void PaintPolyMarker(Option_t *option);
86  void PaintPolyLine(Option_t *option);
87  void PaintTriangles(Option_t *option);
88 
89  ClassDef(TGraph2DPainter,1) // TGraph2D painter
90 };
91 
92 #endif
Int_t * fPTried
Equal to fDelaunay->fNdt.
const char Option_t
Definition: RtypesCore.h:62
void PaintPolyLine(Option_t *option)
Paints the 2D graph as PaintPolyLine.
Double_t fXNmax
Equal to fDelaunay->fXNmin.
void PaintPolyMarker0(Int_t n, Double_t *x, Double_t *y)
Paints a circle at each vertex. Each circle background is white.
void PaintLevels(Int_t *v, Double_t *x, Double_t *y, Int_t nblev=0, Double_t *glev=0)
Paints one triangle.
int Int_t
Definition: RtypesCore.h:41
void Paint(Option_t *option)
Paint a TGraphDelaunay according to the value of "option":
TGraphDelaunay2D * fDelaunay2D
void PaintTriangles_new(Option_t *option)
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
Double_t * fXN
Pointer to fGraph2D->fZ.
Int_t fNdt
Equal to fGraph2D->fNpoints.
Double_t * fY
Pointer to fGraph2D->fX.
Double_t * fYN
Pointer to fDelaunay->fXN.
Double_t * fZ
Pointer to fGraph2D->fY.
A doubly linked list.
Definition: TList.h:47
Double_t fYmax
fGraph2D->fHistogram limits
TGraph2D * fGraph2D
SVector< double, 2 > v
Definition: Dict.h:5
void PaintTriangles(Option_t *option)
Paints the 2D graph as triangles.
Double_t fXNmin
Pointer to fGraph2D->fZE.
void FindTriangles()
Find triangles in fDelaunay and initialise the TGraph2DPainter values needed to paint triangles or fi...
void PaintErrors(Option_t *option)
Paints the 2D graph as error bars.
Int_t * fNTried
Pointer to fDelaunay->fPTried.
double Double_t
Definition: RtypesCore.h:55
Double_t fYNmin
Equal to fDelaunay->fXNmax.
Double_t fYNmax
Equal to fDelaunay->fYNmin.
Double_t * fEX
Pointer to fDelaunay->fYN.
void PaintContour(Option_t *option)
Paints the 2D graph as a contour plot.
TGraphDelaunay * fDelaunay
Pointer to fDelaunay->fMTried.
Double_t y[n]
Definition: legend1.C:17
TList * GetContourList(Double_t contour)
Returns the X and Y graphs building a contour.
Mother of all ROOT objects.
Definition: TObject.h:58
Int_t * fMTried
Pointer to fDelaunay->fNTried.
Double_t * fEY
Pointer to fGraph2D->fXE.
void PaintTriangles_old(Option_t *option)
void PaintPolyMarker(Option_t *option)
Paints the 2D graph as PaintPolyMarker.
Double_t * fEZ
Pointer to fGraph2D->fYE.
The TGraphDelaunay painting class.
Graphics object made of three arrays X, Y and Z with the same number of points each.
Definition: TGraph2D.h:50
const Int_t n
Definition: legend1.C:16
TGraphDelaunay generates a Delaunay triangulation of a TGraph2D.
Double_t fXmin
Equal to fDelaunay->fYNmax.
virtual ~TGraph2DPainter()
TGraph2DPainter destructor.