Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use chartxvsy for 4 nos of y plots in cwgraph

how to create the data array for the chartxvsy option for 4 channels of y plots in cwgraph
0 Kudos
Message 1 of 2
(3,135 Views)
The first parameter to ChartXvsY should be one-dimensional array and the second parameter should be a two-dimensional array. For example, here's how you would chart 4 arrays of random Y values against a single array of X values:

Dim xData(49) As Double
Dim yData(3, 49) As Double

Dim i As Integer
For i = 0 To 49
xData(i) = i
yData(0, i) = (Rnd() * 10)
yData(1, i) = (Rnd() * 10) + 10
yData(2, i) = (Rnd() * 10) + 20
yData(3, i) = (Rnd() * 10) + 30
Next

CWGraph1.ChartXvsY xData, yData

- Elton
Message 2 of 2
(3,135 Views)