LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph: Visible Data Only

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!

0 Kudos
Message 1 of 7
(2,908 Views)

By default the upper limit is exclusive, but you can right click the "in range and coerce" function to change that.

 

Capture.PNG

0 Kudos
Message 2 of 7
(2,897 Views)

Same for the Y values. Use an AND inside the loop to match both conditions.

Message 3 of 7
(2,874 Views)

This is more efficient, and compatible with older versions of LV

0 Kudos
Message 4 of 7
(2,835 Views)

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.


CLD Using LabVIEW since 2013
0 Kudos
Message 5 of 7
(2,828 Views)

@quiquitus wrote:

This is more efficient, and compatible with older versions of LV


This has nothing to do with an xy graph.

0 Kudos
Message 6 of 7
(2,824 Views)

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

0 Kudos
Message 7 of 7
(2,819 Views)