ROOT » GRAF2D » GRAF » TGraphPolargram

class TGraphPolargram: public TNamed, public TAttText, public TAttLine

TGraphPolargram : to draw polar axis

TGraphPolargram draw the polar axis of the TGraphPolar.


output of htmldoc/MACRO_TGraphPolargram_1.gif
   TCanvas * CPol = new TCanvas("CPol","TGraphPolar Examples",500,500);

   Double_t rmin=0;
   Double_t rmax=TMath::Pi()*2;
   Double_t r[1000];
   Double_t theta[1000];

   TF1 * fp1 = new TF1("fplot","cos(x)",rmin,rmax);
   for (Int_t ipt = 0; ipt < 1000; ipt++) {
      r[ipt] = ipt*(rmax-rmin)/1000+rmin;
      theta[ipt] = fp1->Eval(r[ipt]);
   TGraphPolar * grP1 = new TGraphPolar(1000,r,theta);

   return CPol;

Function Members (Methods)

voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
voidChangeRangePolar(Double_t tmin, Double_t tmax)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tDistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(Option_t* options = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual Short_tTAttText::GetTextAlign() const
virtual Float_tTAttText::GetTextAngle() const
virtual Color_tTAttText::GetTextColor() const
virtual Font_tTAttText::GetTextFont() const
virtual Float_tTAttText::GetTextSize() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTAttText::Modify()
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TGraphPolargram&operator=(const TGraphPolargram&)
voidPaintCircle(Double_t x, Double_t y, Double_t r, Double_t phimin, Double_t phimax, Double_t theta)
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
virtual voidTAttText::ResetAttText(Option_t* toption = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidTAttText::SaveTextAttributes(ostream& out, const char* name, Int_t alidef = 12, Float_t angdef = 0, Int_t coldef = 1, Int_t fondef = 61, Float_t sizdef = 1)
voidSetAxisAngle(Double_t angle = 0)MENU
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTAttLine::SetLineAttributes()MENU
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNdivPolar(Int_t Ndiv = 508)MENU
voidSetNdivRadial(Int_t Ndiv = 508)MENU
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPolarLabel(Int_t div, const TString& label)
voidSetPolarLabelColor(Color_t tcolorangular = 1)MENU
voidSetPolarLabelFont(Font_t tfontangular = 62)MENU
voidSetPolarLabelSize(Double_t angularsize = 0.040000000000000001)MENU
voidSetPolarOffset(Double_t PolarOffset = 0.040000000000000001)MENU
voidSetRadialLabelColor(Color_t tcolorradial = 1)MENU
voidSetRadialLabelFont(Font_t tfontradial = 62)MENU
voidSetRadialLabelSize(Double_t radialsize = 0.035000000000000003)MENU
voidSetRadialOffset(Double_t RadialOffset = 0.025000000000000001)MENU
voidSetRangePolar(Double_t tmin, Double_t tmax)MENU
voidSetRangeRadial(Double_t rmin, Double_t rmax)MENU
virtual voidTAttText::SetTextAlign(Short_t align = 11)
virtual voidTAttText::SetTextAngle(Float_t tangle = 0)MENU
virtual voidTAttText::SetTextAttributes()MENU
virtual voidTAttText::SetTextColor(Color_t tcolor = 1)
virtual voidTAttText::SetTextColorAlpha(Color_t tcolor, Float_t talpha)
virtual voidTAttText::SetTextFont(Font_t tfont = 62)
virtual voidTAttText::SetTextSize(Float_t tsize = 1)
virtual voidTAttText::SetTextSizePixels(Int_t npixels)
voidSetTickpolarSize(Double_t tickpolarsize = 0.02)MENU
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TGraphPolargram(const char* name = "")
TGraphPolargram(const TGraphPolargram&)
TGraphPolargram(const char* name, Double_t rmin, Double_t rmax, Double_t tmin, Double_t tmax)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Int_tFindAlign(Double_t angle)
Double_tFindTextAngle(Double_t theta)
virtual voidPaint(Option_t* options = "")
voidPaintPolarDivisions(Bool_t noLabels)
voidPaintRadialDivisions(Bool_t drawaxis)
voidReduceFraction(Int_t Num, Int_t Denom, Int_t& rnum, Int_t& rden)

Data Members

static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TGraphPolargram::(anonymous)kLabelOrtho
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
Double_tfAxisAngleSet angle of the radial axis
Int_tfCutRadialif fCutRadial = 0, circles are cut by radial axis
Int_tfNdivPolNumber of polar divisions
Int_tfNdivRadNumber of radial divisions
Color_tfPolarLabelColorSet color of the angular labels
Font_tfPolarLabelFontSet font of angular labels
TString*fPolarLabels![fNdivPol] Specified polar labels
Double_tfPolarOffsetOffset for Polar labels
Double_tfPolarTextSizeSet Polar text size
Color_tfRadialLabelColorSet color of the radial labels
Font_tfRadialLabelFontSet font of radial labels
Double_tfRadialOffsetOffset for radial labels
Double_tfRwrmaxMaximal radial value (real world)
Double_tfRwrminMinimal radial value (real world)
Double_tfRwtmaxMinimal angular value (real world)
Double_tfRwtminMinimal angular value (real world)
Double_tfTickpolarSizeSet size of Tickmarks

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGraphPolargram(const char* name, Double_t rmin, Double_t rmax, Double_t tmin, Double_t tmax)
 TGraphPolargram Constructor.
TGraphPolargram(const char* name = "")
 Short constructor used in the case of a spider plot.
 TGraphPolargram destructor.
void ChangeRangePolar(Double_t tmin, Double_t tmax)
 Set the Polar range.
 tmin is the start number.
 tmax is the end number.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
 Everything within the circle belongs to the TGraphPolargram.
void Draw(Option_t* options = "")
 Draw Polargram.
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
 Indicate that there is something to click here.
Int_t FindAlign(Double_t angle)
 Find the alignement rule to apply for TText::SetTextAlign(Short_t).
Double_t FindTextAngle(Double_t theta)
 Determine the orientation of the polar labels according to their angle.
void Init()
 Initiallize some of the fields of TGraphPolargram.
void Paint(Option_t* options = "")
void PaintCircle(Double_t x, Double_t y, Double_t r, Double_t phimin, Double_t phimax, Double_t theta)
 This is simplifed from TEllipse::PaintEllipse.
 Draw this ellipse with new coordinates.
void PaintPolarDivisions(Bool_t noLabels)
 Draw Polar divisions.
 Check for editable pad or create default.
void PaintRadialDivisions(Bool_t drawaxis)
 Paint radial divisions.
 Check for editable pad or create default.
void ReduceFraction(Int_t Num, Int_t Denom, Int_t& rnum, Int_t& rden)
 Reduce fractions.
void SetAxisAngle(Double_t angle = 0)
 Set axis angle.
void SetNdivPolar(Int_t Ndiv = 508)
 Set the number of Polar divisions: enter a number ij with 0<i<99
 i sets the major Polar divisions.
 j sets the minor Polar divisions.
void SetNdivRadial(Int_t Ndiv = 508)
 Set the number of radial divisions: enter a number ij with 0<i<99
 i sets the major radial divisions.
 j sets the minor radial divisions.
void SetPolarLabel(Int_t div, const TString& label)
 Set some specified polar labels, used in the case of a spider plot.
void SetPolarLabelColor(Color_t tcolorangular = 1)
 Set Polar labels color.
void SetPolarLabelFont(Font_t tfontangular = 62)
void SetPolarLabelSize(Double_t angularsize = 0.040000000000000001)
 Set angular labels size.
void SetPolarOffset(Double_t PolarOffset = 0.040000000000000001)
 Set the labels offset.
void SetRadialLabelColor(Color_t tcolorradial = 1)
 Set radial labels color.
void SetRadialLabelFont(Font_t tfontradial = 62)
 Set radial label font.
void SetRadialLabelSize(Double_t radialsize = 0.035000000000000003)
 Set radial labels size.
void SetRadialOffset(Double_t RadialOffset = 0.025000000000000001)
 Set the labels offset.
void SetRangePolar(Double_t tmin, Double_t tmax)
 Allows to change range Polar.
 tmin is the start number.
 tmax is the end number.
void SetRangeRadial(Double_t rmin, Double_t rmax)
 Set the radial range.
 rmin is at center of the circle.
 rmax is at the intersection of the right X axis part and the circle.
void SetTickpolarSize(Double_t tickpolarsize = 0.02)
 Set polar ticks size.
void SetToDegree()
 The Polar circle is labelled using degree.
void SetToGrad()
 The Polar circle is labelled using gradian.
void SetToRadian()
 The Polar circle is labelled using radian.
void SetTwoPi()
set range from 0 to 2*pi
TGraphPolargram(const char* name, Double_t rmin, Double_t rmax, Double_t tmin, Double_t tmax)
Color_t GetPolarColorLabel()
{ return fPolarLabelColor;}
Color_t GetRadialColorLabel()
Double_t GetAngle()
{ return fAxisAngle;}
Double_t GetPolarLabelSize()
{return fPolarTextSize;}
Double_t GetPolarOffset()
{ return fPolarOffset; }
Double_t GetRadialLabelSize()
{return fRadialTextSize;}
Double_t GetRadialOffset()
{ return fRadialOffset; }
Double_t GetRMin()
{ return fRwrmin;}
Double_t GetRMax()
{ return fRwrmax;}
Double_t GetTickpolarSize()
{return fTickpolarSize;}
Double_t GetTMin()
{ return fRwtmin;}
Double_t GetTMax()
{ return fRwtmax;}
Font_t GetPolarLabelFont()
{ return fPolarLabelFont;}
Font_t GetRadialLabelFont()
{ return fRadialLabelFont;}
Int_t GetNdivPolar()
{ return fNdivPol;}
Int_t GetNdivRadial()
{ return fNdivRad;}
Bool_t IsDegree()
{return fDegree;}
Bool_t IsRadian()
{return fRadian;}
Bool_t IsGrad()
{return fGrad;}