Plotting X, Y, and Z Data on an ActiveX 3D Surface Graph

LabVIEW 2015 Help

Edition Date: June 2015

Part Number: 371361M-01

»View Product Info
Download Help (Windows Only)

Complete the following steps to plot x, y, and z data on an ActiveX 3D surface graph.

  1. Add an ActiveX 3D surface graph to the front panel.

    Note  The 3D graph controls are available only in the LabVIEW Full and Professional Development Systems.
  2. On the block diagram, delete the 3D Surface VI and the wire to the VI. This leaves only the ActiveX container terminal for the 3D graph.
  3. Add an Invoke Node to the block diagram, and wire the 3D graph container terminal to the reference input of the Invoke Node.

  4. Right-click the Invoke Node and select Select Method»Plot3DMesh from the shortcut menu. The Plot3DMesh method accepts variant data for arrays of x, y, and z data and plots triangulated surfaces.
  5. Enter variant data to the xVector, yVector, and zVector inputs of the Plot3DMesh method. The values of xVector and yVector specify where the corresponding point in the zVector array is.
    The default values for xVector and yVector are 0, 1, 2, 3, and so on. The first point in zVector array (index 0,0) is located at (x vector[0], y vector[0]), or (0,0). If you change xVector to –1, 1, 2, 3, and so on, the first point in zVector moves to (–1,0).
  6. (Optional) Wire magnitude data to the wVector input of the Plot3DMesh method to show the magnitude.
  7. Scale the graph to ensure that array dimensions match. The dimension size of the 2D array is the product of the 1D arrays.
    For example, xVector and yVector correspond to the two indexes for the zVector 2D array. If the number of elements in xVector does not match the width of the zVector array in the first dimension, and the number of elements in yVector does not match the width of the zVector array in the second dimension, this method ignores the values of both xVector and yVector.
  8. Run the VI.

Complete the following steps to show individual points instead of surfaces.

  1. Right-click the front panel graph and select CWGraph3D»Properties from the shortcut menu.
  2. Click the Plots tab and change the plot style to Point.
  3. To avoid getting multiple colors for every point, select None from the Color map style pull-down menu.
    Note  You might have to change the default point color and size on the Point page for the data to be visible on the graph.
  4. Click the OK button.
  5. Run the VI.

You also can plot x, y, and z data on a 3D graph XControl.

WAS THIS ARTICLE HELPFUL?

Not Helpful