06-14-2018 10:59 AM
Is there a way to directly retrieve only the currently visible data (within X and Y scale limits) from an XY graph, perhaps from a property node? I couldn't find any documentation on XY graph's properties from NI.
Alternatively, what's the best way to conditionally index an array in LabView? I can only think of inelegant ways to accomplish array conditional array indexing in Labview, but surely there must be a good way to do this.
In python I would do:
y_visible = y[(x > 3) & (x < 9)]
where the X axes limits are 3 and 9. This line gets the subarray of y where x is between 3 and 9.
Thanks!
06-14-2018 11:20 AM - edited 06-14-2018 11:21 AM
By default the upper limit is exclusive, but you can right click the "in range and coerce" function to change that.
06-14-2018 02:55 PM
Same for the Y values. Use an AND inside the loop to match both conditions.
07-01-2018 10:53 PM - edited 07-01-2018 10:54 PM
This is more efficient, and compatible with older versions of LV
07-01-2018 11:43 PM
Hello,
You can use property node to retrieve the X and Y limits and get the data from that limits. Create a XY graph property node Select X-Axis ---> Range--> Minimum \ Maximum. Use the same for Y-Axis.
07-01-2018 11:59 PM
@quiquitus wrote:
This is more efficient, and compatible with older versions of LV
This has nothing to do with an xy graph.
07-02-2018 12:43 AM
for:
"In python I would do:
y_visible = y[(x > 3) & (x < 9)]
where the X axes limits are 3 and 9. This line gets the subarray of y where x is between 3 and 9.
"
is applicable