LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph array contains redundant data

Hi - I'm trying to come up with a structure to present my data.

 

I need a variable number of plots.

Each plot has X-Y coordinates that vary.

The number of XY coordinates per plot varies too.

I need to update the graph regulalry during a process.

 

I think I need an XY graph. But the problem I have is this: 

To get multiple plots, I need to use an array of clusters of coordinate pairs.

But if one plot contains more data than the others, I get a whole bunch of redundant 0,0 coordinates in the other plots. This messes up the appearance of the graph.

 

How can I get around this? I presume there is some way to have multiple plots with different amounts of data per plot?

 

See attached VI for an example.

 

Thanks in advance for any help!

 

Jon.

0 Kudos
Message 1 of 4
(3,313 Views)

I would look at the XY graph example.

 

The data structure you have appears to be equivalent to "Array of Points Multiplot".  I noticed that if I changed the array index in one of the arrays, the other 2 changed as well.  So the 3 are inherently linked.

 

I would recommend using the "X and Y arrays Multiplot" and build the data that way. 

0 Kudos
Message 2 of 4
(3,295 Views)

Look at the way you encapsulated your data. There is unuseful zeros in your plots, you only have to dont put it, or remove it depending on your application. Look at the attached VI, ask for any question.

 

Jimmy

0 Kudos
Message 3 of 4
(3,281 Views)

(Jimmy, the original poster has LabVIEW 7.1, so he will not be able to see your example, wiich is in LabVIEW 8.6.)

 

The problem is that the inner arrays are padded with zeroes for equal lenght, and this points to faulty coding where you generate the data in the first place. Can you show us how you generate the data? Maybe there is a better way.

 

Anyway, to clean up the data after the fact, you could just trim the inner arrays to the valid ranges as follows (I start searching at element 1 in order to retain the first point if there is a plot with one point that is [0,0]).

 

Here's a quick example on how you could do it (autoindex, unbundle, seach 1D array, array subset, bundle, autoindex):

 

 

Message Edited by altenbach on 11-02-2008 10:36 AM
0 Kudos
Message 4 of 4
(3,267 Views)