LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D array, want to draw all rows in array as different XYgraphs below each other

I have a 2D array. Each row of the array represents a signal that I want to draw (there are 50 rows). Now I want to draw all signals below each other. (With a chart it's possible to click on stack charts to do this). But how is this possible with an XY graph ?
0 Kudos
Message 1 of 7
(3,221 Views)
Hello,

It sounds like what you want to do is better suited for a Waveform Graph or Chart than an XY Graph. You said you have a 2D array where each row has data you wish to plot vs. (I assume) its index in the array, which is what Waveform Graphs and Charts are for. An XY Graph is used when you have a set of data points that you wish to plot against another set of data points, and that doesn't sound like what you want to do here.

I have attached a sample VI (saved in LabVIEW 7.0 format) that shows plotting a 2D array of points to a Waveform Graph and to a stacked Waveform Chart, where each row is represented as a separate plot.

Hope this helps,
-D
0 Kudos
Message 2 of 7
(3,221 Views)
Thanks for the help. I probably should do this with a Waveform Graph or Chart.

I only have one problem to look at your VI. I have Labview 6.1 and can't open your file.
Is it possible to add it in a 6.1 (or lower) format ?

Veerle
0 Kudos
Message 3 of 7
(3,221 Views)
It really doesn't require an example. All you have to do is wire the 2D array straight to either the chart or graph. Expand the plot legend on the chart to show the stacked plots. With 50 to display, you're going to need a lot of screen area for stacked plots and non-stacked will require a lot of different plot colors, line styles, and point styles to differentiate them. You might want to consider an option where the user can choose x number of plots to display at any one time.
0 Kudos
Message 4 of 7
(3,221 Views)
Hi Veerle,

Here is a copy of the VI saved in LabVIEW 6.1 format. It's very simple...sorry if you were expecting more. 🙂

You should look into upgrading to LabVIEW 7.0...there are a huge number of new features in this version...my favorite two are probably the tree control (a control on the front panel that allows tree listings of items), and the subpanel (a way to show a VI's panel within the panel of another VI).

Good luck,
-D
0 Kudos
Message 5 of 7
(3,221 Views)
I already tried this, but my signals are still drawn on each other.
I made a little VI with random numbers and as you see, everything is drawn in one screen. My signal are not stacked and I want them stacked.
0 Kudos
Message 6 of 7
(3,221 Views)
Thank you very much.

I got it now. Apparently you can't stack plots in a graph, so you have to use a chart.

By the way, the idea of choosing which signals to show is a great idea, because it's too difficult to show all of them at once.

So, thanks a lot for the help.

Veerle
0 Kudos
Message 7 of 7
(3,221 Views)