Salvador Marti
2014-10-08 13:01:05 UTC
Hi
i've just started using pyroot. I can define, fill and plot histograms.
So far so good.
However I found a difficulty and I need help.
I need to plot a TPolyLine with 5 points and I do the following:
xmod = [0., 0., 0., 0., 0.]
ymod = [0., 0., 0., 0., 0.]
# in between I compute the values
mypoly = TPolyLine(5, xmod, ymod)
And I got this error message:
TypeError: none of the 5 overloaded methods succeeded. Full details:
TPolyLine::TPolyLine() =>
takes at most 0 arguments (3 given)
TPolyLine::TPolyLine(Int_t n, Option_t* option = "") =>
takes at most 2 arguments (3 given)
TPolyLine::TPolyLine(const TPolyLine& polyline) =>
takes at most 1 arguments (3 given)
TPolyLine::TPolyLine(Int_t n, Float_t* x, Float_t* y, Option_t*
option = "") =>
could not convert argument 3
TPolyLine::TPolyLine(Int_t n, Double_t* x, Double_t* y, Option_t*
option = "") =>
could not convert argument 2
It looks like this is not the way to pass an array. What's the right way?
Thanks
Salva
i've just started using pyroot. I can define, fill and plot histograms.
So far so good.
However I found a difficulty and I need help.
I need to plot a TPolyLine with 5 points and I do the following:
xmod = [0., 0., 0., 0., 0.]
ymod = [0., 0., 0., 0., 0.]
# in between I compute the values
mypoly = TPolyLine(5, xmod, ymod)
And I got this error message:
TypeError: none of the 5 overloaded methods succeeded. Full details:
TPolyLine::TPolyLine() =>
takes at most 0 arguments (3 given)
TPolyLine::TPolyLine(Int_t n, Option_t* option = "") =>
takes at most 2 arguments (3 given)
TPolyLine::TPolyLine(const TPolyLine& polyline) =>
takes at most 1 arguments (3 given)
TPolyLine::TPolyLine(Int_t n, Float_t* x, Float_t* y, Option_t*
option = "") =>
could not convert argument 3
TPolyLine::TPolyLine(Int_t n, Double_t* x, Double_t* y, Option_t*
option = "") =>
could not convert argument 2
It looks like this is not the way to pass an array. What's the right way?
Thanks
Salva