ROOT  6.06/09
Reference Guide
TGraphPolar.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_TGraphPolar
13 #define ROOT_TGraphPolar
14 
15 #ifndef ROOT_TGraphErrors
16 #include "TGraphErrors.h"
17 #endif
18 #ifndef ROOT_Riosfwd
19 #include "Riosfwd.h"
20 #endif
21 #ifndef ROOT_TAttText
22 #include "TAttText.h"
23 #endif
24 #ifndef ROOT_TAttLine
25 #include "TAttLine.h"
26 #endif
27 
28 #include "TGraphPolargram.h"
29 
30 //////////////////////////////////////////////////////////////////////////
31 // //
32 // TGraphPolar //
33 // //
34 // Polar graph graphics class. //
35 // //
36 //////////////////////////////////////////////////////////////////////////
37 
38 class TGraphPolar: public TGraphErrors {
39 
40 private:
41  Bool_t fOptionAxis; // Force drawing of new coord system
42 
43 protected:
44  TGraphPolargram* fPolargram; // The polar coordinates system
45  Double_t* fXpol; // [fNpoints] points in polar coordinates
46  Double_t* fYpol; // [fNpoints] points in polar coordinates
47 
48 
49 public:
50  TGraphPolar();
51  TGraphPolar(Int_t n, const Double_t* theta=0, const Double_t* r=0,
52  const Double_t* etheta=0, const Double_t* er=0);
53  virtual ~TGraphPolar();
54 
56 
57  void Draw(Option_t* options = "");
59  void SetMaxRadial(Double_t maximum = 1); //*MENU*
60  void SetMinRadial(Double_t minimum = 0); //*MENU*
61  void SetMaximum(Double_t maximum = 1) {SetMaxRadial(maximum);}
62  void SetMinimum(Double_t minimum = 0) {SetMinRadial(minimum);}
63  void SetMaxPolar(Double_t maximum = 6.28318530717958623); //*MENU*
64  void SetMinPolar(Double_t minimum = 0); //*MENU*
65  void SetOptionAxis(Bool_t opt) {fOptionAxis = opt;};
66  void SetPolargram(TGraphPolargram *p) {fPolargram = p;};
67  Double_t *GetXpol();
68  Double_t *GetYpol();
69 
70  ClassDef(TGraphPolar,1); // Polar graph
71 };
72 
73 #endif
void SetMaxRadial(Double_t maximum=1)
Set maximum radial at the intersection of the positive X axis part and the circle.
void SetMinRadial(Double_t minimum=0)
Set minimum radial in the center of the circle.
TGraphPolar()
TGraphPolar default constructor.
Definition: TGraphPolar.cxx:68
const char Option_t
Definition: RtypesCore.h:62
Bool_t fOptionAxis
Definition: TGraphPolar.h:41
void SetMinPolar(Double_t minimum=0)
Set minimum Polar.
Double_t * fXpol
Definition: TGraphPolar.h:45
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void SetMaximum(Double_t maximum=1)
Set the maximum of the graph.
Definition: TGraphPolar.h:61
void SetOptionAxis(Bool_t opt)
Definition: TGraphPolar.h:65
ClassDef(TGraphPolar, 1)
void SetMinimum(Double_t minimum=0)
Set the minimum of the graph.
Definition: TGraphPolar.h:62
TGraphPolargram * GetPolargram()
Definition: TGraphPolar.h:55
Bool_t GetOptionAxis()
Definition: TGraphPolar.h:58
To draw a polar graph.
Definition: TGraphPolar.h:38
ROOT::R::TRInterface & r
Definition: Object.C:4
To draw polar axis.
void SetMaxPolar(Double_t maximum=6.28318530717958623)
Set maximum Polar.
double Double_t
Definition: RtypesCore.h:55
virtual ~TGraphPolar()
TGraphPolar destructor.
Definition: TGraphPolar.cxx:93
Double_t * fYpol
Definition: TGraphPolar.h:46
TGraphPolargram * fPolargram
Definition: TGraphPolar.h:44
void Draw(Option_t *options="")
Draw TGraphPolar.
A TGraphErrors is a TGraph with error bars.
Definition: TGraphErrors.h:28
Double_t * GetXpol()
Return points in polar coordinates.
Double_t * GetYpol()
Return points in polar coordinates.
const Int_t n
Definition: legend1.C:16
void SetPolargram(TGraphPolargram *p)
Definition: TGraphPolar.h:66