Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 #include "TGraphErrors.h"
16 #include "TAttText.h"
17 #include "TAttLine.h"
18 
19 #include "TGraphPolargram.h"
20 
21 
22 class TGraphPolar: public TGraphErrors {
23 
24 private:
25  Bool_t fOptionAxis; ///< Force drawing of new coord system
26 
27 protected:
28  TGraphPolargram* fPolargram; ///< The polar coordinates system
29  Double_t* fXpol; ///< [fNpoints] points in polar coordinates
30  Double_t* fYpol; ///< [fNpoints] points in polar coordinates
31 
32 
33 public:
34  TGraphPolar();
35  TGraphPolar(Int_t n, const Double_t* theta=0, const Double_t* r=0,
36  const Double_t* etheta=0, const Double_t* er=0);
37  virtual ~TGraphPolar();
38 
39  TGraphPolargram *GetPolargram() {return fPolargram;};
40 
41  void Draw(Option_t* options = "");
42  Bool_t GetOptionAxis() {return fOptionAxis;};
43  void SetMaxRadial(Double_t maximum = 1); //*MENU*
44  void SetMinRadial(Double_t minimum = 0); //*MENU*
45  void SetMaximum(Double_t maximum = 1) {SetMaxRadial(maximum);}
46  void SetMinimum(Double_t minimum = 0) {SetMinRadial(minimum);}
47  void SetMaxPolar(Double_t maximum = 6.28318530717958623); //*MENU*
48  void SetMinPolar(Double_t minimum = 0); //*MENU*
49  void SetOptionAxis(Bool_t opt) {fOptionAxis = opt;};
50  void SetPolargram(TGraphPolargram *p) {fPolargram = p;};
51  Double_t *GetXpol();
52  Double_t *GetYpol();
53 
54  ClassDef(TGraphPolar,1); // Polar graph
55 };
56 
57 #endif