Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

cwgraph multidimensional array

I have a 100 x 12 array ... 12 sets of data with 100 data points in each set. I would like CW graph to plot the 12 sets of data on the same graph. How do I pass the array to the cwgraph control to do this?
0 Kudos
Message 1 of 3
(6,086 Views)
You can plot this with the PlotY method on CWGraph. For example, the following example creates a 2D array as you described, populates it with random data, and plots it on the graph:


Dim data(11, 99) As Double
Dim i, j As Integer

For i = 0 To 11
For j = 0 To 99
data(i, j) = (Rnd * 10) + (i * 10)
Next
Next

CWGraph1.PlotY data


- Elton
0 Kudos
Message 2 of 3
(6,077 Views)
Thanks! My problem was I had the indexes reversed -- so I was getting 100 plots with 12 data points.
0 Kudos
Message 3 of 3
(6,066 Views)