1 (edited by anandstudy1973 2018-09-23 20:15:23)

Topic: add interpolation / trend line for a point series

i am able to add a point series and now want to use interpolation function of graph
how to get interpolation curve programmatically.
i am interested to draw trend line for any point series

Re: add interpolation / trend line for a point series

I am so glad you ask as the newest beta version (https://www.padowan.dk/beta/) has functionality for this. There are two methods for this in TPointSeries: CreateTrendline and CreateModelTrendline

The following shows how to use the two methods. They are basically the same as the two tabs in the Insert trendline dialog.

Trendline = PointSeries.CreateTrendline(Graph.ttPower)
Trendline2 = PointSeries.CreateModelTrendline("$a*x^$b+$c", {"$a": 27, "$b": 0.5})

I can see that the documentation for the two methods is placed under the Graph module instead of TPointSeries in the plugin documentation. I will get that fixed.