LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Easy Question re spreadsheet format

Hello,

I am trying to take data from a ascii tab-delimited file with 2 columns
and plot the first column versus the second column.

I am using the "read from spreadsheet file" VI from the functions menu
and the output is a 2 (or 3?)-d array.

I can't figure out how to plot this. I tried using XY plot but it would
not wire up. I think that I need to somehow split the arrays and then
bundle them for input to the XY graph.

Any Suggestions would be greatly appreciated!

Thanks

Jonathan Sexton
Department of Chemistry
UCSD
0 Kudos
Message 1 of 3
(4,055 Views)
Here you go, easire than explaining

Jonathan Sexton wrote in message <379CACA9.EC14A8F0@ucsd.edu>...
>Hello,
>
>I am trying to take data from a ascii tab-delimited file with 2 columns
>and plot the first column versus the second column.
>
>I am using the "read from spreadsheet file" VI from the functions menu
>and the output is a 2 (or 3?)-d array.
>
>I can't figure out how to plot this. I tried using XY plot but it would
>not wire up. I think that I need to somehow split the arrays and then
>bundle them for input to the XY graph.
>
>Any Suggestions would be greatly appreciated!
>
>Thanks
>
>Jonathan Sexton
>Department of Chemistry
>UCSD
>



[Attachment Graph XY from Spreadsheet.jpg, see below]
0 Kudos
Message 2 of 3
(4,055 Views)
> I can't figure out how to plot this. I tried using XY plot but it would
> not wire up. I think that I need to somehow split the arrays and then
> bundle them for input to the XY graph.
>

That is exactly what you want to do. Drop an index node and grow
it to have two index terminals for 2D arrays. Popup on one of the
terminals and choose to disable it. This will index out a 1D array
instead of a single element. Wire a constant, 0 or 1, to the other
terminal. If you are slicing the array the wrong way, swap the
constant and the disabled terminal.

Once you have two arrays, bundle them and wire to the graph. If
you have other data to plot, make an array of the clusters.

The help on the graph terminal lists some of the data types they
accept, and they mention a
n example that shows the diagram way to
build some of these. It may come in handy, though I don't think
it shows how to deal with 2D arrays.

Greg McKaskle
0 Kudos
Message 3 of 3
(4,055 Views)