RE: TGraphPolar

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Tue, 17 Jul 2007 11:02:20 +0200


By default the range along the angles is 0-2Pi. If you need to change the range you can do (after grp1->Draw()):

gPad->Update();
grP1->GetPolargram()->SetRangePolar(angle1,angle2);

I hope it helps.
Cheers, O.Couet  

-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch
[mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of OKUMURA, Akira Sent: Monday, July 16, 2007 7:09 AM
To: RootTalk
Subject: [ROOT] TGraphPolar

Hello ROOTers

I tried the macro in
http://root.cern.ch/root/html/TGraphPolar.html and the result was same as
http://root.cern.ch/root/html/MACRO_TGraphPolar_1_CPol.gif

But if I change the line #5

before:	Double_t rmax=TMath::Pi()*2;
after:	Double_t rmax=TMath::Pi();

I get the attached GIF image.

"after" should be

        theta = cos(r) here 0<=r<=pi
but the result seems

        theta = cos(r/2) here 0<=r<=2*pi

Is there any my misunderstanding?

ROOT 5.16 + OS X 10.4.10(PPC) Sincerely

OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
Institute for Cosmic Ray Research, University of Tokyo 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan Phone/Fax : +81 4-7136-3153 Skype : okumura.akira Received on Tue Jul 17 2007 - 11:02:27 CEST

This archive was generated by hypermail 2.2.0 : Tue Jul 17 2007 - 11:50:02 CEST