Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
26class TGraph2D;
27class TGraphDelaunay;
29class TList;
30
31class TGraph2DPainter : public TObject {
32
33protected:
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 *fEXlow; ///<! Pointer to fGraph2D->fXElow
41 Double_t *fEXhigh; ///<! Pointer to fGraph2D->fXEhigh
42 Double_t *fEYlow; ///<! Pointer to fGraph2D->fYElow
43 Double_t *fEYhigh; ///<! Pointer to fGraph2D->fYEhigh
44 Double_t *fEZlow; ///<! Pointer to fGraph2D->fZElow
45 Double_t *fEZhigh; ///<! Pointer to fGraph2D->fZEhigh
46 Double_t fXNmin; ///<! Equal to fDelaunay->fXNmin
47 Double_t fXNmax; ///<! Equal to fDelaunay->fXNmax
48 Double_t fYNmin; ///<! Equal to fDelaunay->fYNmin
49 Double_t fYNmax; ///<! Equal to fDelaunay->fYNmax
50 Double_t fXmin; ///<! fGraph2D->fHistogram Xmin
51 Double_t fXmax; ///<! fGraph2D->fHistogram Xmax
52 Double_t fYmin; ///<! fGraph2D->fHistogram Ymin
53 Double_t fYmax; ///<! fGraph2D->fHistogram Ymax
54 Double_t fZmin; ///<! fGraph2D->fHistogram Zmin
55 Double_t fZmax; ///<! fGraph2D->fHistogram Zmax
56 Int_t fNpoints; ///<! Equal to fGraph2D->fNpoints
57 Int_t fNdt; ///<! Equal to fDelaunay->fNdt
58 Int_t *fPTried; ///<! Pointer to fDelaunay->fPTried
59 Int_t *fNTried; ///<! Pointer to fDelaunay->fNTried
60 Int_t *fMTried; ///<! Pointer to fDelaunay->fMTried
61
62
63 TGraphDelaunay *fDelaunay; ///<! Pointer to the TGraphDelaunay2D to be painted
64 TGraphDelaunay2D *fDelaunay2D; ///<! Pointer to the TGraphDelaunay2D to be painted
65 TGraph2D *fGraph2D; ///<! Pointer to the TGraph2D in fDelaunay
66
67 void FindTriangles();
68 void PaintLevels(Int_t *v, Double_t *x, Double_t *y, Int_t nblev = 0, Double_t *glev = nullptr);
70
73
75
76public:
77
81
82 ~TGraph2DPainter() override;
83
85 void Paint(Option_t *option) override;
91
92 ClassDefOverride(TGraph2DPainter,0) // TGraph2D painter
93};
94
95#endif
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
The TGraphDelaunay painting class.
void PaintContour(Option_t *option)
Paints the 2D graph as a contour plot.
Int_t * fNTried
! Pointer to fDelaunay->fNTried
Double_t * fYN
! Pointer to fDelaunay->fYN
TGraphDelaunay * fDelaunay
! Pointer to the TGraphDelaunay2D to be painted
void Paint(Option_t *option) override
Paint a TGraphDelaunay according to the value of "option":
Double_t fYmin
! fGraph2D->fHistogram Ymin
Double_t * fZ
! Pointer to fGraph2D->fZ
void PaintLevels(Int_t *v, Double_t *x, Double_t *y, Int_t nblev=0, Double_t *glev=nullptr)
Paints one triangle.
TGraphDelaunay2D * fDelaunay2D
! Pointer to the TGraphDelaunay2D to be painted
TGraph2D * fGraph2D
! Pointer to the TGraph2D in fDelaunay
void PaintErrors(Option_t *option)
Paints the 2D graph as error bars.
Double_t * fXN
! Pointer to fDelaunay->fXN
Int_t * fMTried
! Pointer to fDelaunay->fMTried
void FindTriangles()
Find triangles in fDelaunay and initialise the TGraph2DPainter values needed to paint triangles or fi...
Int_t * fPTried
! Pointer to fDelaunay->fPTried
Double_t fXNmin
! Equal to fDelaunay->fXNmin
Double_t fXmax
! fGraph2D->fHistogram Xmax
Double_t * fEZhigh
! Pointer to fGraph2D->fZEhigh
Int_t fNpoints
! Equal to fGraph2D->fNpoints
Double_t fZmin
! fGraph2D->fHistogram Zmin
Int_t fNdt
! Equal to fDelaunay->fNdt
Double_t * fEYlow
! Pointer to fGraph2D->fYElow
TList * GetContourList(Double_t contour)
Returns the X and Y graphs building a contour.
Double_t * fX
! Pointer to fGraph2D->fX
Double_t fYmax
! fGraph2D->fHistogram Ymax
Double_t * fEXhigh
! Pointer to fGraph2D->fXEhigh
void PaintPolyMarker0(Int_t n, Double_t *x, Double_t *y)
Paints a circle at each vertex. Each circle background is white.
void PaintTriangles(Option_t *option)
Paints the 2D graph as triangles.
void PaintPolyMarker(Option_t *option)
Paints the 2D graph as PaintPolyMarker.
Double_t * fY
! Pointer to fGraph2D->fY
Double_t fYNmin
! Equal to fDelaunay->fYNmin
Double_t * fEXlow
! Pointer to fGraph2D->fXElow
void PaintPolyLine(Option_t *option)
Paints the 2D graph as PaintPolyLine.
Double_t * fEYhigh
! Pointer to fGraph2D->fYEhigh
TGraph2DPainter()
TGraph2DPainter default constructor.
Double_t fZmax
! fGraph2D->fHistogram Zmax
void PaintTriangles_old(Option_t *option)
Paints the 2D graph as triangles (old implementation)
void GetGraph2dProperties()
Protected method to get all TGraph2D properties.
~TGraph2DPainter() override
TGraph2DPainter destructor.
Double_t fYNmax
! Equal to fDelaunay->fYNmax
Double_t * fEZlow
! Pointer to fGraph2D->fZElow
Double_t fXmin
! fGraph2D->fHistogram Xmin
Double_t fXNmax
! Equal to fDelaunay->fXNmax
void PaintTriangles_new(Option_t *option)
Paints the 2D graph as triangles (new implementation)
Graphics object made of three arrays X, Y and Z with the same number of points each.
Definition TGraph2D.h:41
TGraphDelaunay2D generates a Delaunay triangulation of a TGraph2D.
TGraphDelaunay generates a Delaunay triangulation of a TGraph2D.
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16