- Community Home
- :
- Discussion Forums
- :
- Most Active Software Boards
- :
- LabVIEW
- :
- array of XY graphs

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

11-24-2010 03:45 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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?

Solved! Go to Solution.

Solution

Accepted by topic author gnappo

08-27-2015 04:09 PM

11-24-2010 04:50 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

11-24-2010 05:02 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

11-24-2010 05:06 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

11-25-2010 12:06 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

11-25-2010 12:28 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

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.

06-05-2012 09:30 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

It work for me, thanks.