Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

2d contour Graph

I want to plote 2d contour from CWGraph3D control .I have three one dimentional arry . Please help me how make z axis matrix from them . I have arrayX ,arrayY and arrayZ arrays.How feed these arrays in the function .
0 Kudos
Message 1 of 2
(4,590 Views)
Hello

You can check out the examples installed with Measurement Sudio on how to program with the 3d graph. You can find them under ../MeasurementStudio/VB/Samples/3dGraph.

But its really simple to use this control. The following code will plot a dual sine wave surface.

' Create dual sine data
Dim data(40, 40)
Dim x(40)
Dim y(40)
Pi = 3.1415926535
For i = 0 To 40
x(i) = (i - 20) / 20# * Pi
y(i) = (i - 20) / 20# * Pi
Next i
For i = 0 To 40
For j = 0 To 40
data(i, j) = Sin(x(i)) * Cos(y(j))
Next j
Next i
' Plot dual sine data
CWGraph3D1.Plot3DSurface x, y, data
'Change style to contour plot
CWGraph3D1.Plots.Item(1).Style = cwSurfaceContour

I hope this he
lps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(4,590 Views)