Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Plotting Data on 3D Graphs

LabVIEW 2009 Help

Edition Date: June 2009

Part Number: 371361F-01

»View Product Info

Use 3D graphs to plot data in three dimensions. When you add a 3D graph to the front panel, the graph appears on the block diagram with a helper VI. The 3D graphs include the Scatter, Bar, Pie, Stem, Ribbon, Contour, Quiver, Comet, Surface, Mesh, and Waterfall graphs. Complete the following steps to plot data on a 3D graph.

Note  The following steps do not apply to the 3D Surface Graph, 3D Parametric Graph, and 3D Line Graph.
  1. Add a 3D graph to the front panel.
Note  The 3D graphs are available only in the LabVIEW Full and Professional Development Systems.
  1. Select a polymorphic instance from the helper VI on the block diagram.
  2. Configure the appearance of the graph with the 3D Graph properties. Use the Property Node to configure the appearance from the block diagram. Select Plot Properties from the shortcut menu to configure the appearance with the Plot Properties dialog box.
  3. Wire data to each input to plot the graph. Refer to the tables of helper VI inputs for descriptions of each input.
  4. Run the VI.

Scatter, Stem, and Comet Graphs

The following table describes the inputs for the Plot Helper (Vector), Plot Helper (Matrix), and Plot Helper (Matrices) VIs for the Scatter, Stem, and Comet graphs.

NameDescription
x vector/x matrixSpecifies the data you want to plot. x vector is available on the Plot Helper (Vector) and Plot Helper (Matrix) VIs. x matrix is available on the Plot Helper (Matrices) VI.
y vector/y matrixSpecifies the data you want to plot. y vector is available on the Plot Helper (Vector) and Plot Helper (Matrix) VIs. y matrix is available on the Plot Helper (Matrices) VI.
z vector/z matrixSpecifies the data you want to plot. z vector is available on the Plot Helper (Vector) VI. z matrix is available on the Plot Helper (Matrix) and Plot Helper (Matrices) VIs.
Plot IDSpecifies the index from the Plot List on the Scatter, Stem, or Comet page of the Plot Properties dialog box. The default is the first plot from the list.

Refer to the 3D Scatter Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Scatter graph.

 

Refer to the 3D Stem Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Stem graph.

 

Refer to the 3D Comet Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Comet graph.

 

Surface, Contour, Mesh, and Waterfall Graphs

The following table describes the inputs for the Plot Helper (Vector) and Plot Helper (Matrix) VIs for the Surface, Contour, Mesh, and Waterfall graphs.

NameDescription
x vector/x matrixSpecifies the data you want to plot. x vector is available on the Plot Helper (Vector) VI. x matrix is available on the Plot Helper (Matrix) VI.
y vector/y matrixSpecifies the data you want to plot. y vector is available on the Plot Helper (Vector) VI. y matrix is available on the Plot Helper (Matrix) VI.
z matrixSpecifies the matrix you want to plot.
Plot IDSpecifies the index from the Plot List on the Surface, Contour, Mesh, or Waterfall page of the Plot Properties dialog box. The default is the first plot from the list.
Note:  If x matrix, y matrix, and z matrix are the same size, the Surface, Contour, and Mesh graphs plot corresponding values. The Waterfall graph plots only the rows of x matrix, y matrix, and z matrix. When you wire data to x vector, y vector, and z matrix, the graphs plot the ith element of x vector, the jth element of y vector, and the ijth element of z matrix. If you only wire data to z matrix, the graph plots the ijth element of z against i and j.

Refer to the 3D Surface Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Surface graph.

 

Refer to the 3D Contour Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Contour graph.

 

Refer to the 3D Mesh Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Mesh graph.

 

Refer to the 3D Waterfall Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Waterfall graph.

 

Quiver Graphs

The following table describes the inputs for the Plot Helper (Vector) and Plot Helper (Matrix) VIs for the Quiver graph.

NameDescription
Nx matrix/Ny matrix/Nz matrixSpecifies the height of the surface in relation to the z-plane.
x vector/x matrixSpecifies the x-coordinates you want to plot. x vector must equal the number of columns in Nx matrix and Ny matrix. x vector is available on the Plot Helper (Vector) VI. x matrix is available on the Plot Helper (Matrix) VI.
y vector/y matrixSpecifies the y-coordinates you want to plot. y vector must equal the number of columns in Nx matrix and Ny matrix. y vector is available on the Plot Helper (Vector) VI. y matrix is available on the Plot Helper (Matrix) VI.
z matrixSpecifies the matrix you want to plot. The size of z matrix must equal the size of Nz matrix.
Plot IDSpecifies the index from the Plot List on the Quiver page of the Plot Properties dialog box. The default is the first plot from the list.

Refer to the 3D Quiver Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Quiver graph.

 

Ribbon Graphs

The following table describes the inputs for the Plot Helper (Standard), Plot Helper (Vector), and Plot Helper (Matrix) VIs for the Ribbon graph.

NameDescription
x vector/x matrixSpecifies the data you want to plot. x vector is available on the Plot Helper (Vector) VI. x matrix is available on the Plot Helper (Matrix) VI.
y vector/y matrixSpecifies the data you want to plot. y vector is available on the Plot Helper (Standard) and Plot Helper (Vector) VIs. y matrix is available on the Plot Helper (Matrix) VI.
z matrixSpecifies the matrix you want to plot. The size of z matrix must equal the sizes of the other vectors and matrices.
Plot IDSpecifies the index from the Plot List on the Ribbon page of the Plot Properties dialog box. The default is the first plot from the list.

Refer to the 3D Ribbon Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Ribbon graph.

 

Bar Graphs

The following table describes the inputs for the Plot Helper (Vector) and Plot Helper (Matrix) VIs for the Bar graph.

NameDescription
y vectorSpecifies the y-coordinates of the bars you want to plot. The length of y vector must equal the length of z vector or z matrix. If you do not specify y vector the y-axis scale equals the length of z vector or the size of (z matrix, 1).
z vector/z matrixSpecifies the heights of the bars you want to plot. z vector is available on the Plot Helper (Vector) VI. z matrix is available on the Plot Helper (Matrix) VI.
Plot IDSpecifies the index from the Plot List on the Bar page of the Plot Properties dialog box. The default is the first plot from the list.

Refer to the 3D Bar Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Bar graph.

 

Pie Graphs

The following table describes the inputs for the Plot Helper (Vector) and Plot Helper (Matrix) VIs for the Pie graph.

NameDescription
x vector/x matrixSpecifies the size of the slices of pie you want to plot. LabVIEW ignores the non-positive elements in x vector or x matrix.
offset vector/offset matrixSpecifies which slices of pie offset from the center point and how far they offset. The length of offset vector must equal the length of x vector and the length of offset matrix must equal the length of x matrix.
Plot IDSpecifies the index from the Plot List on the Pie page of the Plot Properties dialog box. The default is the first plot from the list.

Refer to the 3D Pie Plot VI in the labview\examples\Math Plots\3D Math Plots directory for an example of using the Pie graph.

 

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit