Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGraphPainter.h
Go to the documentation of this file.
1// @(#)root/histpainter:$Id: TGraphPainter.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_TGraphPainter
13#define ROOT_TGraphPainter
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TGraphPainter //
19// //
20// helper class to draw graphs //
21// //
22//////////////////////////////////////////////////////////////////////////
23
25#include <vector>
26
27class TGraph;
28class TF1;
29class TScatter;
30class TScatter2D;
31
33
34public:
35
37
38 ~TGraphPainter() override;
39
40 void ComputeLogs(Int_t npoints, Int_t opt);
41 Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py) override;
42 void DrawPanelHelper(TGraph *theGraph) override;
43 void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py) override;
44 char *GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const override;
45 virtual Int_t GetHighlightPoint(TGraph *theGraph) const;
46 virtual void HighlightPoint(TGraph *theGraph, Int_t hpoint, Int_t distance);
47 virtual void PaintHighlightPoint(TGraph *theGraph, Option_t *option);
48 void PaintHelper(TGraph *theGraph, Option_t *option) override;
49 void PaintGraph(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt) override;
50 void PaintGrapHist(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt) override;
51 void PaintGraphAsymmErrors(TGraph *theGraph, Option_t *option);
52 void PaintGraphMultiErrors(TGraph *theGraph, Option_t *option);
53 void PaintGraphBentErrors(TGraph *theGraph, Option_t *option);
54 void PaintGraphErrors(TGraph *theGraph, Option_t *option);
55 void PaintGraphPolar(TGraph *theGraph, Option_t *option);
56 void PaintGraphQQ(TGraph *theGraph, Option_t *option);
57 void PaintGraphReverse(TGraph *theGraph, Option_t *option);
58 void PaintGraphSimple(TGraph *theGraph, Option_t *option);
59 void PaintScatter(TScatter *theScatter, Option_t *option) override;
60 void PaintScatter2D(TScatter2D *theScatter, Option_t *option) override;
61 void PaintPolyLineHatches(TGraph *theGraph, Int_t n, const Double_t *x, const Double_t *y);
62 void PaintStats(TGraph *theGraph, TF1 *fit) override;
63 void SetHighlight(TGraph *theGraph) override;
64 void Smooth(TGraph *theGraph, Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype);
65 static void SetMaxPointsPerLine(Int_t maxp=50);
66
67protected:
68
69 static Int_t fgMaxPointsPerLine; ///< Number of points per chunks' line when drawing a graph.
70
71 std::vector<Double_t> gxwork, gywork, gxworkl, gyworkl; ///< Internal buffers for coordinates. Used for graphs painting.
72
73 ClassDefOverride(TGraphPainter,0) // TGraph painter
74};
75
76#endif
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
const char Option_t
Option string (const char).
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
Definition TF1.h:182
void PaintGraphPolar(TGraph *theGraph, Option_t *option)
void PaintGraph(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt) override
void PaintGraphErrors(TGraph *theGraph, Option_t *option)
void PaintGraphAsymmErrors(TGraph *theGraph, Option_t *option)
static void SetMaxPointsPerLine(Int_t maxp=50)
void PaintGraphMultiErrors(TGraph *theGraph, Option_t *option)
void PaintGraphReverse(TGraph *theGraph, Option_t *option)
void PaintGrapHist(TGraph *theGraph, Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt) override
virtual void HighlightPoint(TGraph *theGraph, Int_t hpoint, Int_t distance)
void PaintScatter2D(TScatter2D *theScatter, Option_t *option) override
static Int_t fgMaxPointsPerLine
Number of points per chunks' line when drawing a graph.
virtual Int_t GetHighlightPoint(TGraph *theGraph) const
void PaintStats(TGraph *theGraph, TF1 *fit) override
void PaintPolyLineHatches(TGraph *theGraph, Int_t n, const Double_t *x, const Double_t *y)
void DrawPanelHelper(TGraph *theGraph) override
char * GetObjectInfoHelper(TGraph *theGraph, Int_t px, Int_t py) const override
void ExecuteEventHelper(TGraph *theGraph, Int_t event, Int_t px, Int_t py) override
void ComputeLogs(Int_t npoints, Int_t opt)
std::vector< Double_t > gxworkl
Int_t DistancetoPrimitiveHelper(TGraph *theGraph, Int_t px, Int_t py) override
std::vector< Double_t > gxwork
std::vector< Double_t > gywork
void PaintScatter(TScatter *theScatter, Option_t *option) override
virtual void PaintHighlightPoint(TGraph *theGraph, Option_t *option)
void Smooth(TGraph *theGraph, Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype)
std::vector< Double_t > gyworkl
Internal buffers for coordinates. Used for graphs painting.
void SetHighlight(TGraph *theGraph) override
void PaintGraphSimple(TGraph *theGraph, Option_t *option)
void PaintGraphQQ(TGraph *theGraph, Option_t *option)
~TGraphPainter() override
void PaintGraphBentErrors(TGraph *theGraph, Option_t *option)
void PaintHelper(TGraph *theGraph, Option_t *option) override
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16