LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

number of points in XY graph

Hi every one, I wanted to know if there was a property node to get the number of points displayed on a XY graph,

NIan1234_0-1626212687393.png       how many points are plotted here??

 

And if zoom in, how many points are plotted as follows?

NIan1234_1-1626212697038.png

 

These images are taken from the "XY graph data types.vi", it is in the examples of LabVIEW.

 

 

0 Kudos
Message 1 of 6
(2,071 Views)

The number of points can be found from the value; which you can get from the terminal, from a local variable, or from the Value property.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 6
(2,048 Views)

Maybe I did not explain myself well. What I meant was that I am running LabVIEW, I am seeing the graph, if I zoom in the graph, how can I know the number of points that are being plotted?

 

Thank you

0 Kudos
Message 3 of 6
(2,043 Views)

The XY Graph doesn't indicate the number of points.  But it would be simple to add to the code so as to have a separate indicator for number of points.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 6
(2,032 Views)

Do you want the number of points in the data or the number of points currently visible in the zooned area? You can get the x and y axis ranges from property nodes, then you would iterate over all points with a range check on x and y.

 

There are events for "scale range change". Use that to trigger your calculation.

 

The solution strongly depends on the datatype of the xy graph (complex, cluster of x and y arrays, array of xy points, etc. Single plot? Multiple plots? etc.)

 

Simplest would be to attach a small VI containing the xy graph and typical data and a description how you want to interact with the graph.

0 Kudos
Message 5 of 6
(2,022 Views)

Here is one simple possibility:

 

altenbach_0-1626224884842.png

 

0 Kudos
Message 6 of 6
(2,005 Views)