The waveform graph displays one or more plots of evenly sampled measurements.

The waveform graph plots only single-valued functions with points that are evenly distributed along the x-axis, such as

y = f x
, with points evenly distributed along the x-axis, such as an acquired time-varying waveform. The following front panel shows an example of a waveform graph.

A waveform graph showing two peaks and evenly distributed data points.

The waveform graph can display plots containing any number of points. The graph also accepts several data types, which minimizes the extent to which you must manipulate data before you display it.

Note To display digital data, use the digital waveform graph.

Compatible Data Types for Displaying a Single Plot on a Waveform Graph

The waveform graph accepts several data types for single-plot waveform graphs.

  • A single array of values, interprets the data as points on the graph, and increments the x index by one starting at x = 0.
  • A cluster of an initial x value, a delta x, and an array of y data.
  • The waveform data type, which carries the data, start time, and delta t of a waveform.
  • The dynamic data type, which is for use with Express VIs.

    In addition to the data associated with a signal, the dynamic data type includes attributes that provide information about the signal, such as the name of the signal or the date and time the data was acquired. Attributes specify how the signal appears on the waveform graph. When the dynamic data type includes a single numeric value, the graph plots the single value and automatically formats the plot legend and x-scale time stamp.

    When the dynamic data type includes a single channel, the graph plots the whole waveform and automatically formats the plot legend and x-scale time stamp.

Compatible Data Types for Displaying Multiple Plots on a Waveform Graph

The waveform graph accepts several data types for displaying multiple plots:

  • A 2D array of values, where each row of the array is a single plot. The graph interprets the data as points on the graph and increments the x index by one, starting at x = 0.

    To handle each column of the array as a plot:

    1. Wire a 2D array data type to the graph.
    2. right-click the graph, and select Transpose Array.

    This technique is particularly useful when you sample multiple channels from a DAQ device because the device can return the data as 2D arrays, with each channel stored as a separate column.

  • A cluster of an initial x value, a delta x value, and a 2D array of y data. The graph interprets the y data as points on the graph and increments the x index by delta x, starting at the initial x value.

    This data type is useful for displaying multiple signals that are sampled at the same regular rate.

  • A plot array where the array contains clusters. Each cluster contains a 1D array that contains the y data. The inner array describes the points in a plot, and the outer array has one cluster for each plot. The following front panel shows this array of the y cluster.
    Front panel showing an array of clusters containing y data.

    Use a plot array instead of a 2D array if the number of elements in each plot is different. For example, when you sample data from several channels using different time amounts from each channel, use this data structure instead of a 2D array because each row of a 2D array must have the same number of elements. The number of elements in the interior arrays of an array of clusters can vary.

  • A cluster of an initial x value, a delta x value, and an array that contains clusters. Each cluster contains a 1D array that contains the y data.
    1. Use the Bundle function to bundle the arrays into clusters.
    2. Use the Build Array function to build the resulting clusters into an array.
    3. Use the Build Cluster Array function, which creates arrays of clusters that contain the inputs you specify.
  • An array of clusters of an x value, a delta x value, and an array of y data.

    This is the most general of the multiple-plot waveform graph data types because you can indicate a unique starting point and increment for the x-scale of each plot.

  • The dynamic data type, which is for use with Express VIs.

    In addition to the data associated with a signal, the dynamic data type includes attributes that provide information about the signal, such as the name of the signal or the date and time the data was acquired. Attributes specify how the signal appears on the waveform graph.

    When the dynamic data type includes multiple channels, the graph displays a plot for each channel and automatically formats the plot legend and x-scale time stamp.

For examples of the data types that a waveform graph accepts, refer to the Waveform Graph Data Type VI in the labview\examples\Controls and Indicators\Graphs and Charts\Waveform Graphs and Charts directory.