LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot multiple 2D arrays of data, with different x-values onto one graph

Hello! 

 

So I am trying to create a piece of code that will take in multiple csv files of data (containing time (x) and amplitude (y)) and will plot all of them onto one graph. I am stuck on how to take the 2D arrays of data and plot them all on the same graph. Currently I am able to plot them all by using "Build Array" and taking the time portion from one of the files and using it for all of them, but the problem I have is that not all of my files have the exact same time column, or x-values (data points happen at different times). Anyone have any ideas on how I can do this? Thanks in advance!

0 Kudos
Message 1 of 5
(1,791 Views)

Hi ebohannon,

 

have you tried to use waveforms for your plots? (Or plots in a XY graph?)

This way each plot can use it's own timescale...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,773 Views)

Are the points for each dataset equally spaced? If not, you need an xy graph.

0 Kudos
Message 3 of 5
(1,753 Views)

That is what I am trying to do, but I guess I am just unsure on how to feed multiple sets of x-values to the waveform.

 

And to answer the other question, yes the data points are equally spaced, but some of the data sets are sampled at a higher frequency than others.

0 Kudos
Message 4 of 5
(1,698 Views)

Hi ebohannon,

 


@ebohannon wrote:

That is what I am trying to do, but I guess I am just unsure on how to feed multiple sets of x-values to the waveform.


If you would attach your VI with some example data we could tell you where you made errors…

 


@ebohannon wrote:

And to answer the other question, yes the data points are equally spaced, but some of the data sets are sampled at a higher frequency than others.


So you can use (arrays of) waveforms…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(1,696 Views)