4 TCanvas *c1 = new TCanvas("c1","c1",500,500);
5 TGraphPolar * grP1 = new TGraphPolar();
6 grP1->SetTitle("TGraphPolar example");
8 for (Int_t i = 0; i < 2; i++) {
9 grP1->SetPoint(i, (i+1) * TMath::Pi() / 4, (i+1) * 0.05);
10 grP1->SetPointError(i, 9*TMath::Pi()/180, 0.0);
11 Double_t rr = grP1->GetY()[i];
12 Double_t tt = grP1->GetX()[i];
13 Double_t x = rr * TMath::Cos(tt);
14 Double_t y = rr * TMath::Sin(tt);
15 Printf("(x,y)=(%f,%f)", x, y);
18 TH2* frame = new TH2F("frame", "Frame", 100, -r,r, 100, -r, r);
21 grP1->SetMarkerStyle(1);
22 grP1->SetMarkerSize(1.);
23 grP1->SetMarkerColor(4);
24 grP1->SetLineColor(4);
25 grP1->SetLineWidth(3);
26 grP1->SetFillColor(kRed+1);
27 grP1->SetFillStyle(3001);
28 grP1->Draw("PNEF same");
29 // grP1->Draw("APNEF");
31 // Update, otherwise GetPolargram returns 0
33 TGraphPolargram* gram = grP1->GetPolargram();
34 gram->SetLineWidth(0);
35 // gram->SetLineColor(kWhite);
36 gram->SetNdivPolar(20);
37 gram->SetNdivRadial(10);
39 gram->SetRadialLabelSize(0);
40 gram->SetPolarLabelSize(0);
41 gram->SetAxisAngle(9*TMath::Pi()/180);