<commit_before>// @(#)root/graf:$Name:  $:$Id: TGraphPolar.cxx,v 1.13 2007/06/13 16:27:06 couet Exp $
// Author: <NAME>, <NAME> 02/02/06

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//______________________________________________________________________________
/* Begin_Html
<center><h2>TGraphPolar : to draw a polar graph</h2></center>
TGraphPolar creates a polar graph (including error bars). A TGraphPolar is
a TGraphErrors represented in polar coordinates.
It uses the class TGraphPolargram to draw the polar axis.
<p>
Example:
End_Html
Begin_Macro(source)
{
   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);
   grP1->SetLineColor(2);
   grP1->Draw("AOL");

   return CPol;
}
End_Macro */


#include "TGaxis.h"
#include "TGraphPolar.h"
#include "THLimitsFinder.h"
#include "TPaveText.h"
#include "TStyle.h"
#include "TVirtualPad.h"
#include "TROOT.h"
#include "TLatex.h"
#include "TEllipse.h"
#include "TH1.h"
#include "TMath.h"


ClassImp(TGraphPolar);


//______________________________________________________________________________
TGraphPolar::TGraphPolar() : TGraphErrors()
{
   // TGraphPolar default constructor.
}


//______________________________________________________________________________
TGraphPolar::TGraphPolar(Int_t n, const Double_t* r, const Double_t* theta,
                                  const Double_t *er, const Double_t* etheta)
  : TGraphErrors(n,r,theta,er,etheta)
{
   // TGraphPolar constructor.
   //<commit_msg>Fix uninitialized pointers in the default constructor<commit_after>// @(#)root/graf:$Name:  $:$Id: TGraphPolar.cxx,v 1.14 2007/07/18 12:59:01 couet Exp $
// Author: <NAME>, <NAME> 02/02/06

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//______________________________________________________________________________
/* Begin_Html
<center><h2>TGraphPolar : to draw a polar graph</h2></center>
TGraphPolar creates a polar graph (including error bars). A TGraphPolar is
a TGraphErrors represented in polar coordinates.
It uses the class TGraphPolargram to draw the polar axis.
<p>
Example:
End_Html
Begin_Macro(source)
{
   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);
   grP1->SetLineColor(2);
   grP1->Draw("AOL");

   return CPol;
}
End_Macro */


#include "TGaxis.h"
#include "TGraphPolar.h"
#include "THLimitsFinder.h"
#include "TPaveText.h"
#include "TStyle.h"
#include "TVirtualPad.h"
#include "TROOT.h"
#include "TLatex.h"
#include "TEllipse.h"
#include "TH1.h"
#include "TMath.h"


ClassImp(TGraphPolar);


//______________________________________________________________________________
TGraphPolar::TGraphPolar() : TGraphErrors()
{
   // TGraphPolar default constructor.
   fXpol       = 0;
   fYpol       = 0;
   fPolargram  = 0;
   fOptionAxis = kFALSE;
}


//______________________________________________________________________________
TGraphPolar::TGraphPolar(Int_t n, const Double_t* r, const Double_t* theta,
                                  const Double_t *er, const Double_t* etheta)
  : TGraphErrors(n,r,theta,er,etheta)
{
   // TGraphPolar constructor.
   //
{'fraction_non_alphanumeric': 0.17984231834647346, 'fraction_numerical': 0.030897080758576605, 'mean_word_length': 3.206093189964158, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6853366', 'n_tokens_mistral': 1569, 'n_tokens_neox': 1429, 'n_words': 324}