Plot3DSurface Method
Syntax
CWGraph3D.Plot3DSurface xVector, yVector, zMatrix [, wMatrix]
Purpose
Plots two 1D arrays and one (or two) 2D array(s) of data as a surface.
Remarks
Plot3DSurface uses the first available plot from the CWGraph3D.Plots collection that is marked as a multiplot. If there is not a plot available, it adds a new plot with MultiPlot set to True.
Parameters
xVector As Variant
1D array of X data.
yVector As Variant
1D array of Y data.
zMatrix As Variant
2D array of Z data.
wMatrix As Variant
[Optional] 2D array of magnitude data.
Example
'Generate data to plot
Const n = 20#
Dim x(n), y(n), z(n, n)
For i = 0 To n
x(i) = (i / n - 0.5) * 2 * PI
y(i) = (i / n - 0.5) * 2 * PI
Next i
For i = 0 To n
For j = 0 To n
z(i, j) = Sinh(x(i)) * Cos(y(j))
Next j
Next i
'Plot the data on each graph
CWGraph3D1.Plot3DSurface x, y, z