LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot each collum as a graph

Hello...

I have a simple problem, but I am not able to solve it.

I have a ascii file with 10 columns and 50 lines each column. I need to load this file and plot each column as a individual graph.

My idea: Read from spreadsheet -> Index Array -> Array to Cluster (cluster size=10) -> Unbundle -> wire each graph to each cluster

Did not work!!! Where is the problem?

A second way to do this is: after load the ascii file, transpose the data, converting each column in one row, and apply many Array subset and wire each graph to each array subset. But I am avoiding this because this way I will need to create 10 array subset.


Thanks

Daniel
0 Kudos
Message 1 of 6
(2,995 Views)

Hi Daniel,

your idea sounds good, but you can connect your array directly to the graph. Can you upload your data file and your code, or a picture of your code?

Mike



Message Edited by MikeS81 on 05-12-2008 11:23 AM
0 Kudos
Message 2 of 6
(2,971 Views)


daniel.penteado a écrit:
Hello...

I have a simple problem, but I am not able to solve it.

I have a ascii file with 10 columns and 50 lines each column. I need to load this file and plot each column as a individual graph.

My idea: Read from spreadsheet -> Index Array -> Array to Cluster (cluster size=10) -> Unbundle -> wire each graph to each cluster

Did not work!!! Where is the problem?

A second way to do this is: after load the ascii file, transpose the data, converting each column in one row, and apply many Array subset and wire each graph to each array subset. But I am avoiding this because this way I will need to create 10 array subset.


Thanks

Daniel




If you intend to have 10 different graph indicators on your panel, then you just have to use an index array function, expand it to create 10 outputs (I bet you missed that property... ;)), then wire each output to each graph. Of course, don't forget to wire also the first column input with a zero value, to tell LV you want to extract the colum data.
You could also have a single graph indicator showing all the 10 curves. Since your data are organized as colums, transpose the 2D array first, then wire it directly to the graph.
Chilly Charly    (aka CC)
Message 3 of 6
(2,961 Views)
Mike... attached is the VI and a TXT file with my data....

Chilli, I don't know how to set up only one index array to plot 10 graphs from one array, 1 graph per column.

Sorry people, I am a beginner user.

Thanks

Daniel


Message Edited by daniel.penteado on 05-12-2008 08:35 AM
Download All
0 Kudos
Message 4 of 6
(2,942 Views)
Hi Daniel,
see the attached example picture please.
Mike


Message Edited by MikeS81 on 05-12-2008 04:18 PM
0 Kudos
Message 5 of 6
(2,929 Views)


daniel.penteado a écrit:
... Chilli, I don't know how to set up only one index array to plot 10 graphs from one array, 1 graph per column.


Just point your mouse cursor on the index array function icon, then click on the handle that appears and drag to display the required number of outputs.
Chilly Charly    (aka CC)
0 Kudos
Message 6 of 6
(2,913 Views)