Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGraphPolargram.h
Go to the documentation of this file.
1// @(#)root/graf:$Id$
2// Author: Sebastian Boser, 02/02/06
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_TGraphPolargram
13#define ROOT_TGraphPolargram
14
15#include "TAttText.h"
16#include "TAttLine.h"
17#include "TNamed.h"
18
19
20class TGraphPolargram: public TNamed, public TAttText, public TAttLine {
21
22private:
26
27 Color_t fPolarLabelColor; ///< Set color of the angular labels
28 Color_t fRadialLabelColor; ///< Set color of the radial labels
29
30 Double_t fAxisAngle; ///< Set angle of the radial axis
31 Double_t fPolarOffset; ///< Offset for Polar labels
32 Double_t fPolarTextSize; ///< Set Polar text size
33 Double_t fRadialOffset; ///< Offset for radial labels
35 Double_t fRwrmin; ///< Minimal radial value (real world)
36 Double_t fRwrmax; ///< Maximal radial value (real world)
37 Double_t fRwtmin; ///< Minimal angular value (real world)
38 Double_t fRwtmax; ///< Minimal angular value (real world)
39 Double_t fTickpolarSize; ///< Set size of Tickmarks
40
41 Font_t fPolarLabelFont; ///< Set font of angular labels
42 Font_t fRadialLabelFont; ///< Set font of radial labels
43
44 Int_t fCutRadial; ///< if fCutRadial = 0, circles are cut by radial axis
45 ///< if fCutRadial = 1, circles are not cut
46 Int_t fNdivRad; ///< Number of radial divisions
47 Int_t fNdivPol; ///< Number of polar divisions
48
49 TString* fPolarLabels; ///<! [fNdivPol] Specified polar labels
50
51 void Paint(Option_t* options="") override;
54 void ReduceFraction(Int_t Num, Int_t Denom, Int_t &rnum, Int_t &rden);
55 void Init();
58
59public:
60 // TGraphPolarGram status bits
61 enum { kLabelOrtho = BIT(14) };
62
63 TGraphPolargram(const char* name="");
64 TGraphPolargram(const char* name, Double_t rmin, Double_t rmax,
65 Double_t tmin, Double_t tmax, const char *opt = "");
66 ~TGraphPolargram() override;
67
70
76 Double_t GetRMin() { return fRwrmin; }
77 Double_t GetRMax() { return fRwrmax; }
79 Double_t GetTMin() { return fRwtmin; }
80 Double_t GetTMax() { return fRwtmax; }
81
84
88
89 Bool_t IsDegree() {return fDegree; }
90 Bool_t IsRadian() {return fRadian; }
91 Bool_t IsGrad() {return fGrad; }
92
94 void Draw(Option_t* options="") override;
95 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
97 Double_t phimin, Double_t phimax, Double_t theta);
98 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
99 void SetAxisAngle(Double_t angle = 0); //*MENU*
100 void SetNdivPolar(Int_t Ndiv = 508); //*MENU*
101 void SetNdivRadial(Int_t Ndiv = 508); //*MENU*
102 void SetPolarLabel(Int_t div, const TString & label);
103 void SetPolarLabelSize(Double_t angularsize = 0.04); //*MENU*
104 void SetPolarLabelColor(Color_t tcolorangular = 1); //*MENU*
105 void SetPolarLabelFont(Font_t tfontangular = 62); //*MENU*
106 void SetPolarOffset(Double_t PolarOffset=0.04); //*MENU*
107 void SetRadialOffset(Double_t RadialOffset=0.025); //*MENU*
108 void SetRadialLabelSize (Double_t radialsize = 0.035); //*MENU*
109 void SetRadialLabelColor(Color_t tcolorradial = 1); //*MENU*
110 void SetRadialLabelFont(Font_t tfontradial = 62); //*MENU*
111 void SetRangePolar(Double_t tmin, Double_t tmax); //*MENU*
112 void SetRangeRadial(Double_t rmin, Double_t rmax); //*MENU*
113 void SetTickpolarSize(Double_t tickpolarsize = 0.02); //*MENU*
114 void SetToDegree(); //*MENU*
115 void SetToGrad(); //*MENU*
116 void SetToRadian(); //*MENU*
117 void SetTwoPi();
118
120};
121
122#endif
ROOT::R::TRInterface & r
Definition Object.C:4
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
short Font_t
Font number (short).
Definition RtypesCore.h:95
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
short Color_t
Color number (short).
Definition RtypesCore.h:99
const char Option_t
Option string (const char).
Definition RtypesCore.h:80
#define BIT(n)
Definition Rtypes.h:91
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
char name[80]
Definition TGX11.cxx:148
Double_t fRwrmin
Minimal radial value (real world).
void ReduceFraction(Int_t Num, Int_t Denom, Int_t &rnum, Int_t &rden)
Double_t GetPolarLabelSize()
Color_t fRadialLabelColor
Set color of the radial labels.
void SetPolarLabelColor(Color_t tcolorangular=1)
void PaintPolarDivisions(Bool_t noLabels)
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Computes distance from point (px,py) to the object.
void SetRangePolar(Double_t tmin, Double_t tmax)
Double_t fPolarTextSize
Set Polar text size.
Double_t fRwtmin
Minimal angular value (real world).
Double_t GetRadialOffset()
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to an event at (px,py).
TGraphPolargram(const char *name="")
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a primitive as a C++ statement(s) on output stream "out".
Double_t fRadialTextSize
Double_t GetTickpolarSize()
void SetPolarOffset(Double_t PolarOffset=0.04)
Double_t FindTextAngle(Double_t theta)
void SetRadialLabelColor(Color_t tcolorradial=1)
void PaintCircle(Double_t x, Double_t y, Double_t r, Double_t phimin, Double_t phimax, Double_t theta)
void SetRangeRadial(Double_t rmin, Double_t rmax)
void SetTickpolarSize(Double_t tickpolarsize=0.02)
void SetAxisAngle(Double_t angle=0)
void SetNdivPolar(Int_t Ndiv=508)
TGraphPolargram(const char *name, Double_t rmin, Double_t rmax, Double_t tmin, Double_t tmax, const char *opt="")
Int_t fNdivRad
Number of radial divisions.
Font_t GetPolarLabelFont()
void Draw(Option_t *options="") override
Default Draw method for all objects.
Double_t fTickpolarSize
Set size of Tickmarks.
void SetRadialLabelSize(Double_t radialsize=0.035)
Font_t fPolarLabelFont
Set font of angular labels.
TString * fPolarLabels
! [fNdivPol] Specified polar labels
void PaintRadialDivisions(Bool_t drawaxis)
Double_t GetAngle()
~TGraphPolargram() override
void ChangeRangePolar(Double_t tmin, Double_t tmax)
void SetPolarLabelSize(Double_t angularsize=0.04)
void SetRadialLabelFont(Font_t tfontradial=62)
Double_t fAxisAngle
Set angle of the radial axis.
Double_t fRwtmax
Minimal angular value (real world).
Double_t fRwrmax
Maximal radial value (real world).
void SetPolarLabel(Int_t div, const TString &label)
Font_t fRadialLabelFont
Set font of radial labels.
Int_t fNdivPol
Number of polar divisions.
Double_t GetPolarOffset()
Font_t GetRadialLabelFont()
Int_t fCutRadial
if fCutRadial = 0, circles are cut by radial axis if fCutRadial = 1, circles are not cut
Color_t fPolarLabelColor
Set color of the angular labels.
Double_t fPolarOffset
Offset for Polar labels.
void Paint(Option_t *options="") override
This method must be overridden if a class wants to paint itself.
void SetPolarLabelFont(Font_t tfontangular=62)
void SetRadialOffset(Double_t RadialOffset=0.025)
Color_t GetRadialColorLabel()
Int_t FindAlign(Double_t angle)
void SetNdivRadial(Int_t Ndiv=508)
Double_t GetRadialLabelSize()
Color_t GetPolarColorLabel()
Double_t fRadialOffset
Offset for radial labels.
TNamed()
Definition TNamed.h:38
Basic string class.
Definition TString.h:138
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17