Topic: tredline

I was wondering if it will be possible for you to make (since I don't know programming) either a plugin or add an option to the tredline dialog box that after you insert a tredline, it will give a table containing the offset of each point.
Thank you!

Re: tredline

It should be possible to make it as a plugin, but I currently lack the time to do it.

Re: tredline

I may give it a try. Do you plan on using the plugin only for functions? (only one possible y-value for one said x-value)

But first, here's what I think I would do, tell me if that's how you'd like it :

- In a Graph file, you'd need to have only, and in that order, the Axes, the Point Series and the Trend-line Function.
- You'd then select the Plugins menu and click on "Calculate Trendline Distance"
- This would create a new Point Series which would hold the distance between the original Point Series and the Trend-line Function, for each point in the original Point Series.

As a matter of sign convention, when the trendline is below the point, would you like the Distance to be a positive number?

4 (edited by jjgltzr 2013-04-09 15:55:35)

Re: tredline

Thank you GraphUser3546!
Yes, I am planning on using the plugin only for y-functions; and I would like the plugin to work the way you have it.
In regard to sign convention, when the trendline is below the point, I would like the Distance to be a positive number.

5 (edited by GraphUser3546 2013-04-20 03:55:35)

Re: tredline

Place the attached file in your Program files in \Graph\Plugins

Start a new Graph instance.

Enjoy.

GraphUser3546

P.S.: I have taken the liberty to add some intelligence to the plugin. It can only be executed when you have at least 1 pt series and 1 standard function. The plugin will check the distance between only the first pt series it encounters and the first function it encounters in the left-hand list. Should work well. I haven't tested it thoroughly, but it does the calculation correctly. Post here if there's anything.

Post's attachments

Attachment icon YDistanceTrendline.py 5.05 kb, 504 downloads since 2013-04-20 

Re: tredline

It works GREAT!!!
Thank You!

Re: tredline

I'm glad to hear that!
You're welcome wink

Re: tredline

Hi GraphUser3546. The plugin is really coming to use! Thank you!
I was wondering if it will be possible for you to add a dialog box to that plugin from which I can choose a tredline and a point series (so far it only does it for the first ones)...
Thanks

Re: tredline

Hi jjgltzr,

I don't work much with dialog boxes, especially for the type of tweak you're asking for. I'm certain it would make my script better if I added your feature, but I lack the time to learn more on this matter.

Does the script work properly, in general? All you have to do is to move the two objects you want compared to the top of the list. It's the best workaround I have to offer.

If you wish to learn how to script, here's a cool resource for learning Python : http://www.codecademy.com/tracks/python
Also, for scripting in Graph, you'd have to take a look at the menu "Help>>Scripting Engine Documentation".
The best thing then is to have a look at pre-existing Graph scripts.

I'm sorry I can't help more...