01-23-2012 11:49 AM
Hello!
I want to cut some pieces of XY graph and show them on a new graph.
The problem is, how to cut piece that is between two cursors.
I try this way, but it is obviously wrong approach.
Any ideas?
Greetings,
Mariusz
Solved! Go to Solution.
01-23-2012 12:15 PM
I dont have LV with me right now, but essentially XY graphs are (usually) arrays of X,Y cluster run the cluter through an array and rebuild all values withing the X and Y range you desire, this subset is the new set of values.
01-23-2012 12:23 PM - edited 01-23-2012 12:26 PM
Here's a messy really quickly done example.
It consists of 2 x & 2 y cursors to create a box.
You read the values for each cursor to obtain your high / low values to search for.
Then extract only those points. Replot to another graph to illustrate..
You can simply display the qty 2 1-D arrays or build up a 2D array and display it..
01-23-2012 12:45 PM - edited 01-23-2012 12:49 PM
Thanks for such a quick answers.
Here's snippet of my code.
Your solutions will work if waveform was monotonic but what if it is, for example a sine wave?
How to cut precisely piece of graph that is between the two cursors?
01-23-2012 02:46 PM
If you build your XY based on array of clusters instead on a cluster of arrays, your X,Y points will be correlated and you can do an in range based on the cluster max and min, very clean and doesnt need any assumptions of monotonic nature of data
01-23-2012 02:56 PM
See quick example.
01-23-2012 03:07 PM
Your basic understanding of an XY Graph is flawed. The X axis is only capable of ever increasing X values and your x array is not continuous. If you wired the 'i' output of the for loop and used that as the x axis array, everything would work just fine.
p.s. Get rid of the value properties and the Insert Into Array function.
01-23-2012 03:32 PM
Thank for your help, it solved my problem.
What about the Insert into array?
01-23-2012 03:36 PM
The Insert Into Array is just not necessary. All you have to do is wire the graph indicator directly to the bundle function.