Showing results for 
Search instead for 
Did you mean: 

array of multile xy graphs

Go to solution

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

0 Kudos
Message 1 of 7

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

0 Kudos
Message 2 of 7

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!

CLA // LabVIEW 2016 // BALUG // // Unofficial Forum Rules and Guidelines
Message 3 of 7
Accepted by topic author Photon01

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





0 Kudos
Message 4 of 7

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.

Message 5 of 7

Got it thank you very much!

0 Kudos
Message 6 of 7

@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.



0 Kudos
Message 7 of 7