Author |
Topic |
|
Smith_Panther
Germany
5 Posts |
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 |
|
Hideo Fujii
USA
1582 Posts |
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 |
|
|
Smith_Panther
Germany
5 Posts |
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 |
|
|
Chris D
428 Posts |
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
|
Edited by - Chris D on 01/26/2016 10:19:54 AM |
|
|
minimax
351 Posts |
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 |
|
|
Smith_Panther
Germany
5 Posts |
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
351 Posts |
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 |
|
|
|
Topic |
|