I have another question. Suppose I have a TGraph with some points, and I draw them with option “c”. Given (x0, y0) < (x1, y1) < (x2, y2) are 3 points shown on the graph, with (x1, y1) not in the list of points I feed to the ctor (and so it has to be computed by “c”), how can I get the point out to be stored in a variable etc?
It would be even better if I can somehow do it without actually drawing it, so if I can simply do like x1 = gr->GetSmoothCurve(y) or something along those lines that would be better. Staring at the TGraph class page, nothing stands out as being what I want.
Looks like it, yeah, if the TSpline that Draw(“c”) uses is the same as one as Eval(“s”). Can you confirm if this is the case? If not, what kind of TSpline should I provide?
Also, is it possible to do it the other way around? Meaning, I give a specific value of y and have it return x.
I’m aware that “c”-interpolation isn’t always ideal. But in my use case, I just want to find (from a set of parabolic points) the 2 values of x such that the y equals some values, in order to define the position of the bands.
The parabola can be inspected easily enough, but the current way I do it makes it depend entirely on the granularity of the points I give it. Deciding to inject more points and remaking the whole thing seems overkill to me, since by that part of the code I know already the shape is there.