cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

array of XY graphs

Solved!
Go to solution

array of XY graphs

I have a for loop. Inside the for loop there is an XY graph, whose indicator I have in the front panel. I would like to have the graph not inside the for loop, but outside, with indexing enabled. That is I would like an array of graphs, in order to have available ALL the graphs created (one for each iteration). But I am not able to create such an array of graph. I am able to create and indicator containing the data (it turns out to be a 2d array of cluster of 2 elements (2 1d array)). 

Is there any hope to have what I would like, that is the N graphs from the iterations of the loop?

0 Kudos
Message 1 of 7
(912 Views)
Solution
Accepted by topic author gnappo
08-27-2015 04:09 PM

Re: array of XY graphs

Try to place the graph inside a cluster container before putting it in the array container, Also add a single-height bundle node right before the autoindexing output tunnel of the loop.

 

What datatype are your xy graphs? (array of cluster of points, cluster of x and y arrays, complex, etc.).

 

It would help if you could attach a small example of your code so we can see how you are constructing the graph data.


LabVIEW Champion Do more with less code and in less time
I’m speaking at #NIWeek, May 21-24 in Austin, TX! Join me! (Session 1422)

Message 2 of 7
(902 Views)

Re: array of XY graphs

Thanks, I am going to try what you say.
The data are 1d array of clusters of 2 elements (which are 1d arrays), pink wires. Actually each graph is a plot of data with a fitting line on them.

0 Kudos
Message 3 of 7
(896 Views)

Re: array of XY graphs

Also remember that array elements all share the same properties. Only the values are different. This means that all graphs with have the same axis range, same legend, same colors, etc., for example.


LabVIEW Champion Do more with less code and in less time
I’m speaking at #NIWeek, May 21-24 in Austin, TX! Join me! (Session 1422)

Message 4 of 7
(894 Views)

Rif.: array of XY graphs

It works. You are a genius. Is it just a trick or is there a deep reason why it works?

0 Kudos
Message 5 of 7
(854 Views)

Rif.: array of XY graphs

The deep reason is understanding why your original idea does not work. Smiley Happy

 

Graphs take all kinds of data as I already mentioned. and unless you isolate the data into a cluster, many things will be ambiguous.

 

An easier example is a waveform graph that takes a 1D array for a single plot or a 2D array for multiple plots. So if you were allowed to have an array of graphs and feed it a 2D array, it would not be able to tell if you want a single array element containing a graph with multiple plots or an array of graphs with one curve each. It's ambiguous. For the same reason you cannot place an array inside an array, for example.

 

An "array of clusters" is always allowed, and if the cluster contents are valid data structures for your type of graph, you are OK.


LabVIEW Champion Do more with less code and in less time
I’m speaking at #NIWeek, May 21-24 in Austin, TX! Join me! (Session 1422)

Message 6 of 7
(849 Views)

Re: array of XY graphs

It work for me, thanks. Cat Very Happy

0 Kudos
Message 7 of 7
(445 Views)