LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY Graph Issue

Solved!
Go to solution

LabVIEW 12.0f3 Student Edition 32-bit

Windows 7 64-bit

 

I am trying to simultaneously write a 2D array to a spreadsheet file and plot the same array to an XY Graph. The data consist of pairs of random numbers, between 0 and 1, that I take to be coordinates. When these points are graphed, they are initially shown flattened against the horizontal axis. After some time (it varies depending on the number of points) these points miraculously orient themselves correctly. Does anyone know what I'm doing wrong? I have included my vi and a link to a video showing the problem.

 

Video of problem

0 Kudos
Message 1 of 4
(2,259 Views)
Solution
Accepted by topic author tman12321

Your code in gnereal is incredibly convoluted, and whatever you are doing with the reshaping and subsetting seems totally wrong. (create an indicator on the cluster going to the graph to see the actual values. They are not right!)

 

Here's what I would do instead (or similar).

 

 

 Hint: start with NaN so the invalid data does not show.

Download All
Message 2 of 4
(2,248 Views)

Thanks for the quick reply. I just started programming in LabVIEW, so it's not surprising that my code is terrible. Thanks for showing me the proper way. Smiley Happy

Message 3 of 4
(2,240 Views)

Also note that xy graph accept complex data (X=RE, Y=IM). Now you can use a 1D complex array and everything is even simpler. 😄

 

 

Download All
0 Kudos
Message 4 of 4
(2,195 Views)