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
 Data plot - accessing curve names

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
Smith_Panther Posted - 01/19/2016 : 11:02:47 AM
Origin Ver. and Service Release: 8.6.0 G Sr3
Operating System: Win 7

Hi!

I want to solve the following task using Labtalk (or OriginC if required):

I am plotting about 40 data plots in a single graph. Some of them may be erroneous due to measurement errors, but they will be plotted anyway. After several scripted calculations have been performed I want to mask the erroneous data plots to exclude them from statstics calculations.
My desired procedure would be to open the graph window and mask (not delete or remove from plot!) one ore more curves by simple clicking.

Unfortunately, it doesn't work that simple. Masking single points or a range is no problem but the whole curve at once seems to be impossible.

So my idea is to click on a curve, get the name and/or respective column of it and mask the whole range in the column using a Labtalk script.

However, now I am facing several problems to access the data plots in a direct way. E.g. how can I get the name or respective column by simple clicking on a curve?
The dataset name must be stored somewhere because a right-click unveils the correct description the appearing dialog/properties box. And also in the status bar (at the left bottom of the screen) the correct data set name is shown by simple clicking.

Can somebody help me to solve this issue, please?

Thank you very much in advance!

Smith
6   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 01/27/2016 : 05:49:13 AM
Hi Smith,

Maybe I did not describe my question clearly, however, I think I understand better what you mean now.

I originally thought that clicking on the curve and clicking on the legend have few difference since they are both a single click, just the mouse position is different.

I now think clicking on curve is a better approach since curve gives better visual effect to identify which is the erroneous one, right?

PS: If Chris' script is ok, you can create a user-defined toolbar button to run the script, see example:
http://www.originlab.com/doc/Quick-Help/Button-to-Run-LT-Script

Hope it helps.



Max
OriginLab Technical Support
Smith_Panther Posted - 01/27/2016 : 05:15:29 AM
Hi,

may be the circumstances do not make sense at first glance.

In principle, I wrote a Labtalk script which imports raw measurement data and performs various calculations, plotting and finally an arrangement of tables and graphs on a layout page. We use this layout page as a kind of report in our department. The intention was to have a process which is operator independent.

Sometimes the reports contain erroneous data due to faulty devices. This devices cannot be filtered automatically by the evaluation script and therefore falsifying the statistics calcualtions.
For this reason, masking of erroneous data has to be done manually.
The easiest way for us to identify non-working devices is to look at the V-I-curves (36 data plots in a single graph).

So it would be very helpful to have a macro/script where one can point on a curve and mask it by simple clicking. It should be easy enough for an "untrained" oprator who is not very familiar with Origin.

Of course, the proposed approaches by activating the desired dataset through the menu works fine but in our situation it is not convenient.

I will try the approach suggested by Chris, may be I can combine it with the dotool command.

Kind regards,
Smith
minimax Posted - 01/27/2016 : 01:33:03 AM
Hi Smith,

quote:
So my idea is to click on a curve...
......
...it is inconvenient because I have to activate each dataset manually.


We wonder in what circumstances that click on a curve is preferred, but activate is inconvenient?

Would you mind to show us some more context?

Max
OriginLab Technical Support
Chris D Posted - 01/26/2016 : 10:03:10 AM
Hi,

You can try this to mask the entire Y source data column for a selected plot.

1) Open the Script Window and paste the following code (but don't run it yet):

// Get a range to the Y source column for currently active plot
range -w rYCol = %C;
// Mask the Y column data
mark -w1u rYCol;


2) In your graph, select the plot you want to mask. Depending on whether your plot is grouped or not, you either have to click once to select the plot or single-click twice in a row to select an individual plot. (It may take practice).

3) Back in the Script Window, select the code and press the Enter key to run the script.

The script will mask the entire source Y column.

Will that work for you?

~Chris

Thanks,
Chris Drozdowski
Originlab Technical Support
Smith_Panther Posted - 01/25/2016 : 10:56:35 AM
Hello Hideo,

thank you very much for your reply.
Your approach works but from point of view it is inconvenient because I have to activate each dataset manually.
Is there really no other way to get the name of the dataset without activating it?

Kind regards,
Smith
Hideo Fujii Posted - 01/20/2016 : 11:30:18 AM
Hi Smith,
You can try the following simple way, though I'm not sure if it satisfies what you have envisioned:
1) Choose menu "Format: Page Properties" menu to show the Plot Details dialog at the page level.
2) Choose "Legend/Titles" tab, and turn ON the "Indicate Active Dataset" check box. Click OK.
3) In the legend, select the desired plot to activate.
Now you get the active dataset by the %C system string register.

Hope this helps.

--Hideo Fujii
OriginLab

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