11-04-2009 07:01 PM
Hi Friends,
I have a data file of five coloumns. I know how to get a multiple plot in XY graph with first coloumn in the X axis, and rest of the coloumns in the Y axis. I did it using read spreadsheet file, index array, bundle and finally build array. So I have five plots with the same X value but with different Y value.
Now here is something different I want to do.
I save the data from another vi. and that vi has an input parameter (actually the iteration of a while loop) which will decide how many coloumns of data you will be saving in the file. I want to plot the first coloumn in that data file in the X axis and the rest of the coloumns in the Y axis, thus making as many plots as the input parameter.
I really appreciate if sombody has any idea how to proceed.
Thanks for your kind time.
Regards,
Medhi.
11-04-2009 07:31 PM
11-04-2009 07:35 PM
11-04-2009 07:35 PM
Just delete the first column using "delete from array" and transpose the remaining 2D array. Get the first column from the "deleted portion" output.
Now autoindex the 2D array in a FOR loop. Inside the FOR loop, bundle the X (the first column, not autoindexed) with each Y array from the autoindexing terminal and autoindex the cluster at the right edge and feed ot to the XY graph.
All clear? 🙂
11-04-2009 07:46 PM
There are many different ways to solve this issue. But first, let me ask you a couple questions.
11-04-2009 07:48 PM - edited 11-04-2009 07:48 PM
altenbach wrote:All clear? 🙂
Here's a quick draft. Modify as needed.
11-04-2009 08:29 PM - edited 11-04-2009 08:32 PM
Ah, the old LabVIEW proverb. A picture is worth a thousand words...case and point..
Told you someone would help 🙂
altenbach wrote:Just delete the first column using "delete from array" and transpose the remaining 2D array. Get the first column from the "deleted portion" output.
Now autoindex the 2D array in a FOR loop. Inside the FOR loop, bundle the X (the first column, not autoindexed) with each Y array from the autoindexing terminal and autoindex the cluster at the right edge and feed ot to the XY graph.
All clear? 🙂
11-04-2009 08:41 PM
Perfect.
This is exactly what I want.
Thanks a ton.