The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 statistics over multiple plots from a graph window

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
schneide Posted - 03/06/2018 : 03:17:15 AM
Origin Ver.2018 and Service Release (Select Help-->About Origin): b9.5.0.193
Operating System: win7

I have a graph window with multiple plots (xy-datasets) in one layer.
I would like to programmatically retrieve statistical values such as min, max over all plots combined.

I can do this manually by the menu-GUI "statistics on columns"
by selecting
- input data: "combined as single data set" and
- DataRange: by clicking on the plot

I do not manage to do this programmatically, esp.:
-How do I retrieve a range that contains all plots in the graph?
-How do I perform statistics over all plots from this range combined?


By the way is there a way to find out the code which is executed when I perform a calculation manually by configuring a menu-GUI item?





Giselher
2   L A T E S T    R E P L I E S    (Newest First)
schneide Posted - 03/07/2018 : 06:00:02 AM
Yes, this did the job,

All I had to do now was to add

label -rc rect;

at the end to remove unwanted output onto the graph window.
And to process the information in the tree variable.

Thanks,
Giselher
yuki_wu Posted - 03/06/2018 : 10:26:21 PM
Hi Giselher,

I think you could try the X-Function: addtool_curve_stats
//Execute XF to create gadget	
addtool_curve_stats;
//Declare LT gadget variable
gadget gg = rect;
//Expand ROI to full range
gg.expand(); 
//Define a tree variable
tree mytr; 
//Output result to the tree variable mytr
gg.getresult(mytr);  
//view the tree variable   
mytr.=;

For more info, please refer to these pages:
https://www.originlab.com/doc/X-Function/ref/addtool_curve_stats
https://www.originlab.com/doc/LabTalk/ref/Gadget-obj

For some X-Functions, there is Generate Script context menu to generate X-Function Script. Let us take the addtool_curve_stats X-Function as an example:
1. Select Gadgets: Statistics: Open dialog from menu
2. Set the options in the dialog as usual
3. Click the triangle button at the upper right corner
4. Select Generate Script from the context menu, then the Script Window will pop up with the script

Hope it helps.

Regards,
Yuki
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000