LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple plots from 2d array

I am trying to plot multiple plots on the same graph from a 2-d array so as to have different colors for each element pair. The array is a 2x7. I just can't seem to bundle it properly to break it up into seperate arrays to plot on the same graph. And I want to do this generically so that a 2x10 would be handled as well. Any ideas?
0 Kudos
Message 1 of 8
(4,008 Views)
I figured out a way using a bundle and shift register. Man some of the little things can really slow you down.
0 Kudos
Message 2 of 8
(4,001 Views)
Wire directly your 2D array to a waveform graph. If the data appear "reversed" (lines in place of columns...) insert a "Transpose 2D array" function (in the array subpalette)before the graph.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 3 of 8
(4,004 Views)

@chilly charly wrote:
...insert a "Transpose 2D array" function (in the array subpalette)before the graph...


...or simply right-click the Waveform Graph and choose "Transpose Array".

Have fun!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 8
(3,987 Views)
Well my solution did not work out exactly right. I should have mensioned before, I need to plot on an x-y graph. Still looking for a solution. I need to plot elements 0,0;1,1;2,2.. as seperate graphs on the same graph.

Message Edited by labviewprogrammer on 04-14-2005 05:28 PM

0 Kudos
Message 5 of 8
(3,979 Views)
An XY graph needs a 1D array where each element is a cluster that holds an X coord and a Y coord. If you use several arrays together, you get several plots.
Do you want to take each row (2 elements) as a point in the graph?
If so, how do you know which rows to use for each plot?

___________________
Try to take over the world!
0 Kudos
Message 6 of 8
(3,969 Views)

@labviewprogrammer wrote:
...I need to plot elements 0,0;1,1;2,2.. as seperate graphs on the same graph...

Well, well... this can't be à 2x7 array ! Could you give an example ?

CC
Chilly Charly    (aka CC)
0 Kudos
Message 7 of 8
(3,965 Views)
Hi LabVIEWProgrammer,

Do you want to plot separate plots only consisting of one coordinate each - basically only points, not plots? In that case you will have to split your 2D-array into "x,y"-array pairs, bundle these and build the clusters into an array (please see the attached SeparateXY.vi).

Let me know if this is not what you want, thanks.

Have fun!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 8 of 8
(3,947 Views)