LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do XY Graphs determine which line is which plot?

I'm getting a strange bug. I'm using a XY-Graph to display what should be Three Lines, but the XY Graph is displaying an infinite series of lines.
 
The XY values are correct, but I only want three lines to appear, not infinite. Any advice?
0 Kudos
Message 1 of 8
(3,239 Views)
try to have a look at the XY Graph.vi. (Search in NI Example finder). if you couldnot solve your problem, let me see your vi
0 Kudos
Message 2 of 8
(3,230 Views)
As in your earlier posts, it would help immensely if you actually posted your code. It doesn't sound like your xy data is correct. For 3 separate lines, you should a cluster array with only 3 elements. Each cluster consists of an x array and a y array.
Message 3 of 8
(3,227 Views)

How many points do you have on each line?

"Infinite" is probably not an accurate description, your program would need to run for an infinite amount of time to draw an infinite number of lines. 😮

As others have already said: Show us the code! (unless it is infiniltely large). 😉

Message Edited by altenbach on 09-15-2006 08:54 AM

Message 4 of 8
(3,216 Views)
sorry, I'll try to remember to post the code the first time... next time.
0 Kudos
Message 5 of 8
(3,194 Views)
The XY-plot uses the following format:
1 An array of lines (2)
     2 A line is a cluster (you can't put an array in an array directly)
          3  This line consists of points (an array) 
              4    Each array is is a cluster of X and Y (the data)

What you do in your code is grow the 'Array of lines', so every iteration a line is added.
You should be able to put the output of 'Build Cluster Array' into the XY-graph.

Ton

BTW:
Why do you insert an empty array (output of the for-loop) into the shift register array?

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 6 of 8
(3,189 Views)
That's not the entire code, just the part relevant to the graph.
0 Kudos
Message 7 of 8
(3,167 Views)
That's OK, but you should make sure that the number of elements in the array stays the same, what do you want to do? See more data each run (added into the previous data?)

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 8 of 8
(3,140 Views)