Author |
Topic  |
|
jim117
Germany
5 Posts |
Posted - 02/26/2002 : 04:23:19 AM
|
Hi, I use "data selector" tool to find two different points in a 2D graph. I am just confused whether:
1, Is it possible to show at the same time X and Y coordinate values for both left and right marker in one window of "data display" ? 2, Is it possible to use scripts to realize the mathmatic calculation with Y values for both markers (for example, calculating the [Y2-Y1]) and also show the real-time calculation results in the same window of "data display" above mentioned?
Or, how to get the X and Y coordinate values for both left and right marker showed in "data display window" so that I can use them for data analysis in the script window?
Many thanks for possible suggestion and help!
Jim
|
|
asp001
Russia
9 Posts |
Posted - 02/26/2002 : 07:54:47 AM
|
I think system.datadisplay can show only one pair (X,Y). But you can build your own cursor (I use draw -l -h and draw -l -v). Then use Label as a display for X and Y of each 'cursor'. Having X and Y of the both cursors calculation of the [Y2-Y1] and even [X2-X1] is quite simple. |
 |
|
jim117
Germany
5 Posts |
Posted - 02/27/2002 : 11:34:30 AM
|
ASP001: Many thanks!
When I use command "draw -l -h/-v", for example: draw -n Hline -l -v; draw -n Vline -l -h; Hline.Hmove=1; Hline.Vmove=1; Vline.Hmove=1; Vline.Vmove=1; I find the Hline(horizontal line) can not move. Why?
And how to utilize both lines to build my own cursor so that it can move along the curve in the GraphWindow? I am still not clear. Could you give me more suggestions?
Jim117 |
 |
|
asp001
Russia
9 Posts |
Posted - 02/28/2002 : 08:46:56 AM
|
Hard to explain for me. I'll try. 1. Create lines (Hor and Vert). H-line is just to complete a cursor. 2. In 'label control' for V-line write a script which determine what Y value you have upon moving V-line across the plot (I've used xindex). Use that value to redraw H-line (it looks like cursor's moving). Then you can display the same values (X-from V-line and Y-from fxindex command) on a label. 3. Save H and V lines as objects. So, next time you just load them into your plot and use them. Perhaps there is more simple way. All the best |
 |
|
greg
USA
1379 Posts |
Posted - 02/28/2002 : 4:32:38 PM
|
The VMOVE property for horizontal lines was not working for Origin 6.0. It was fixed in Origin 6.1.
Note the distinction between relative lines such as:
draw -n HLine -l -h x1+(x2-x1)/2;
HLine.vmove=1;
draw -n VLine -l -v y1+(y2-y1)/2;
VLine.hmove=1;
and absolute lines such as:
draw -n ALine -l {2,3,4,5};
ALine.vmove=1;
ALine.hmove=1;
The relative lines extend to the frame edge even if you expand the scale. These lines have (essentially) infinite length. In this respect, it makes no sense to set the HMOVE property of HORIZONTAL lines, nor does it make sense to set the VMOVE property of VERTICAL lines. (It was the VMOVE properties of HORIZONTAL lines that had the problem.)
The absolute lines have selection handles on their ends that allow them to be resized - possibly changing their angle as well.
User asp001 outlines a technique covered in http://www.originlab.com/www/support/resultstech.asp?ItemID=623 .
|
 |
|
|
Topic  |
|