LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview to Excel or word- howto do multi-trace XY plots

I am plotting spectrum measurements from labview to excel and word documents. I need to plot 3 separate lines on the one XY scatter Chart, each of which come through as separate 2D arrays of frequency and amplitude values. The 2nd and 3rd traces are defined over separate subsets of the full frequency (X axis) range of the first trace (and so need to plot just over their defined sets of frequency values).
I can do this easily in excel by defining the X and Y value cell ranges to use for each of the 3 traces.
I would like to create the 3-trace XY chart directly in word (or if necessary excel first), but I cant see enough detailed configuration options in Excel Easy Chart or Word Easy Chart vi's. They just accept one array as input. Can I send 3 sets of X and Y columns?
Does anyone know how to do this?
thanks
Fred
0 Kudos
Message 1 of 8
(4,887 Views)
Hi Fred,

I think I understand what you mean, however to be sure, would it be possible for you to post some screenshots of how you would like the data to be displayed (perhaps post an example of what you were already able to do in Excel). Thanks!

Best regards,

Steven
0 Kudos
Message 2 of 8
(4,854 Views)

thanks. I am not at the machine with the excel files right now. will try and make screenshots later.

basically i have my main spectrum plot : 2 columns: one is freqs from 1 to 100 MHz (4001 pts), the other is corresponding Yvalues.

then I have a limit line plot: 2 columns: one is freqs from 30 to 100 MHz (approx 2500pts), the other is corresponding Y values

then I have a small table of 2 columns: one is selected freqs over the 1 to 100MHZ range (10 pts), the other is corresponding Y values.

All three traces (ie a pair of columns of X and Y values each) need to be plotted on the one chart - submitted from labview as 3 separate 2d arrays I presume .

thanks

Fred

0 Kudos
Message 3 of 8
(4,852 Views)
Hi Fred,

Since the Excel Easy Graph.vi accepts a 2D array of double, have you tried combining your three 2D arrays into one before feeding it into this VI? It would be a matter of using a Build Array VI. Then presumably the easy graph could draw an XY graph from all of the total points.

Best regards,
-Sam F, DAQ Marketing Manager
0 Kudos
Message 4 of 8
(4,841 Views)

Thanks, but I dont see how you mean to 'combine' them?

The 2D array is presumably just one column of X values (freqs) and the other column corresponding Y values (powers) - producing a single trace. Are you suggesting I just add on the X and Y values for the other two traces further down the same original two X and Y columns? How would I get the traces to plot independently, with a legend identifying each?

thanks

Fred

0 Kudos
Message 5 of 8
(4,820 Views)
Hi Fred,

That's true, I did not understand that you wanted an individual legend for each collection of data.

Have you already tried simply using the "Excel Easy Graph" three times, and each time feeding in the same "Graph Title" input to the VI?

-Sam F, DAQ Marketing Manager
0 Kudos
Message 6 of 8
(4,793 Views)
I think I have the same problem.
Using Excel Easy graph creates two seperate graphs. What we are trying to do is add seperate plots to the one graph.

0 Kudos
Message 7 of 8
(4,673 Views)
Hi Malteso,

You can update an existing graph with the "Excel Update Graph.vi". You can basically append additional rows to your 2D array, and if there are different amounts of points in your plots, you can use nan to indicate that there is no value for a given plot at a given X coordinate.

I've attached some simple example code that demonstrates this functionality.

Let me know what you think.

Best regards,
-Sam F, DAQ Marketing Manager
Message 8 of 8
(4,620 Views)