15 TCanvas * CPol =
new TCanvas(
"CPol",
"TGraphPolar Examples",1200,600);
20 Double_t xmax=TMath::Pi()*2;
27 TF1 * fplot =
new TF1(
"fplot",
"cos(2*x)*cos(20*x)",xmin,xmax);
29 for (Int_t ipt = 0; ipt < 1000; ipt++){
30 x[ipt] = ipt*(xmax-xmin)/1000+xmin;
31 y[ipt] = fplot->Eval(x[ipt]);
34 TGraphPolar * grP =
new TGraphPolar(1000,x,y);
37 grP->SetFillStyle(3012);
41 for (Int_t ipt = 0; ipt < 20; ipt++){
42 xval1[ipt] = x[1000/20*ipt];
43 yval1[ipt] = y[1000/20*ipt];
46 TGraphPolar * grP1 =
new TGraphPolar(20,xval1,yval1);
47 grP1->SetMarkerStyle(29);
48 grP1->SetMarkerSize(2);
49 grP1->SetMarkerColor(4);
50 grP1->SetLineColor(4);
55 grP1->GetPolargram()->SetTextColor(8);
56 grP1->GetPolargram()->SetRangePolar(-TMath::Pi(),TMath::Pi());
57 grP1->GetPolargram()->SetNdivPolar(703);
58 grP1->GetPolargram()->SetToRadian();
65 for (Int_t ipt = 0; ipt < 30; ipt++){
66 x2[ipt] = x[1000/30*ipt];
67 y2[ipt] = 1.2 + 0.4*sin(TMath::Pi()*2*ipt/30);
68 ex[ipt] = 0.2+0.1*cos(2*TMath::Pi()/30*ipt);
72 TGraphPolar * grPE =
new TGraphPolar(30,x2,y2,ex,ey);
73 grPE->SetMarkerStyle(22);
74 grPE->SetMarkerSize(1.5);
75 grPE->SetMarkerColor(5);
76 grPE->SetLineColor(6);
77 grPE->SetLineWidth(2);
80 grPE->GetPolargram()->SetTextSize(0.03);
81 grPE->GetPolargram()->SetTwoPi();
82 grPE->GetPolargram()->SetToRadian();