Turn on suggestions

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

Showing results for

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

09-05-2019 04:24 PM

Options

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

Labels:

Hi, I have a 2D cluster of data that has mxn rows and columns. The parameter n could change as it corresponds to the actual physical parameter being changed. n can range from 1 to N, where N is a finite number. If I knew a head of the time what n is I could simply use an index array and plot n plots. But since I don't know n I like to be able to programmatically create the plots. I can envision it using an array of graphs and I've seen an example of it but it doesn't work with my cluster data type and i'm not experienced enough to figure it out. i'm attaching an example where I have a 3x4 array of data and i use an index array to create 3 graphs. Again the goal is to programmatically create the graphs since we don't know n apriori. thanks

Solved! Go to Solution.

09-05-2019 05:06 PM - edited 09-05-2019 05:11 PM

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

When you say "Plot n plots", do you mean have one Graph (or Chart) on which there are N traces? That's very straight-forward, and you can find out how to do this by accessing the LabVIEW Help. Open the Contents tab, go to Fundamentals, Graphs and Charts, and do a little reading under Concepts.

On the other hand, if you mean what your Title suggests, that you want to create an array of XY Graphs (i.e. multiple Graphs, with N determined at run time), I'm not sure that is possible! I recently tried to create an Array of Graphs in response to a question on the LabVIEW Forum, only to discover that this doesn't seem to be possible. This actually makes sense, as a Graph/Chart is not just a simple "indicator", but rather (as I imagine it) a fairly complex LabVIEW construct that __accepts__ data and does nice graphical things to it (like plotting).

If I'm wrong, I'm sure someone "in the know" will show both of us how to do this ...

Bob Schor

09-05-2019 05:28 PM

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

You should be able to display data in an array of graphs if you put the graph into a cluster first. There is some funny behavior, like if you change the index the autoscale doesn't update right away. But, if you click on one of the axes it will update. You can probably solve most of the funny behaviors with property nodes though!

www.gcentral.org

Solution

Accepted by topic author Photon01

09-05-2019 05:51 PM

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

Following @Gregory's advice you can do the following:

mcduff

09-05-2019 09:07 PM

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

Remember that with arrays, all elements need to have the same properties. So something like a Y scale cannot be 0-100 on one graph array element, while 0-500 on a different graph array element.

Unless you find your data has a lot of consistency between graphs, I think you will easily find the limitations on having an array of graphs.

09-06-2019 12:03 PM

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

Got it thank you very much!

09-06-2019 12:10 PM

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

@Photon01 wrote:

Got it thank you very much!

You should really mark @Gregory message 3 as the solution. I just put his words into VIs.

mcduff