Create a polar graph using a TF1 and draw it with PI axis.
See the TGraphPolar documentation
Since TGraphPolar is a TGraphErrors, it is painted with TGraphPainter options.
import math
import numpy as np
import ROOT
CPol =
ROOT.TCanvas(
"CPol",
"TGraphPolar Examples", 500, 500)
rmin = 0
fp1 =
ROOT.TF1(
"fplot",
"cos(x)", rmin, rmax)
r =
np.append(r, ipt * (rmax - rmin) / 1000 + rmin)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
- Author
- Olivier Couet, Jamie Gooding
Definition in file gr014_polar3.py.