LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Multiple Plots Based on Array Size

Solved!
Go to solution

Hi All,

 

I am fairly new to LabView, and I have read several threads that are similar to my problem, but I do not know how to implement it yet.  I basically have a large array that stores raw data read from several text files.  This large array's size would vary based on the number of text files generated by a data acquisition system.  I would like to plot each row of the array on a new plot.  Instead of wiring it manually, is there an easier way around? 

 

Thank you,

 

Lynniz

0 Kudos
Message 1 of 7
(2,676 Views)

Lynniz,

When you say plot are you talking about a graph? As you can see, it affects how you assemble your data....

 

Eric

 

graphs.png

0 Kudos
Message 2 of 7
(2,665 Views)

Yes.  I would like to have each row of the arry on a separate graph.  The number of graphs will change based on the size of the array.  I am thinking about maybe a stacked chart or something.

0 Kudos
Message 3 of 7
(2,645 Views)

Hi Lynniz,

If you connect 2D array to a Waveform chart then each row will be treated as individual plot.

So what you have to do is, combine data from text files, build 2 D array and use Waveform graph.

 

P.S. I assume element size in each row will be same, otherwise extra elemnet will be considered as 0.

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 4 of 7
(2,641 Views)

Thanks for the response Gak.  I forgot to mention that I also have different time segments to graph with each row of the array.  I am currently bundling the time and each row of the array manually to a XY graph.  And to make things more complicated, element size in each row is different.  I just found this out, so I need to find a way around that too.

0 Kudos
Message 5 of 7
(2,635 Views)
Solution
Accepted by topic author Lynniz

Lynniz,

If you need a separate graph for each plot then can you at least determine beforehand what the maximum number of plots could be and show/hide your graphs programmatically based on the data in. All the graphs could be in a subVI that appears separate from your main application window or you could use a subpanel.

 

I'm just brainstorming here. There might be a more elegant way to do this, but showing/hiding graphs that already exist is the only thing I can think of right now.

 

Eric

0 Kudos
Message 6 of 7
(2,625 Views)

Thanks for the reply.  I am going to try your approach.

0 Kudos
Message 7 of 7
(2,610 Views)