Set polar division on TGraphPolar to 0


ROOT Version: 6.12.06
Platform: Fedora 27
Compiler: gcc version 7.3.1 20180303


Hello co-rooters!

I am trying to make a polar graph using TGraphPolar in which only the line of the graph should be drawn, i.e. no axes or Polargram.

To do so I used the SetNdivPolar(0) and SetNdivRadial(0) commands however only the radial components vanish, as seen in the following image.

I also tried to set the line size of the polargram through the editor to 0, however only the divisions vanished.

How is it possible to draw just the line of the TPolarGraph?

A macro that illustrates the issue comes up next!

{

TF1 *Leg2 = new TF1("Leg2", "(3.*pow( TMath::Cos(x), 2 ) - 1. )/2.", 0, 2.*TMath::Pi());
TF1 *Leg4 = new TF1("Leg4", "(35.*pow(TMath::Cos(x) , 4) - 30.*pow( TMath::Cos(x), 2 ) + 3. )/8.", 0, 2.*TMath::Pi()); 
TF1 *f_0 = new TF1("f_0", "1. + 0.8*Leg2(x) - 0.2*Leg4(x)", 0, 2.*TMath::Pi());
double x[1000];
double y[1000];
for (int i=0; i<1000; ++i){
	x[i] = i*TMath::Pi()/500.;
	y[i] = f_0->Eval(x[i]);
}
TGraphPolar *gpolar = new TGraphPolar(1000, x, y);
gpolar->Draw("L");
c1->Update();
gpolar->GetPolargram()->SetNdivPolar(0);
gpolar->GetPolargram()->SetNdivRadial(0);

}

Any idea on how to solve that?

Thank you very much in advance!

I do not think removing these lines is possible.

This is odd!
Any work around on that?

I tried for example, to change the color to kWhite and the text size to 0 but there is still the outer line remaining.

So the best I could come is the following

Is there at least a way to access the outer line?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.