Graphs and Charts



Graphs and Charts

Graphs and charts differ in the way they display and update data. VIs with graphs usually collect the data in an array and then plot the data to the graph, which is similar to a spreadsheet that first stores the data then generates a plot of it. In contrast, a chart appends new data points to those already in the display. On a chart, you can see the current reading or measurement in context with data previously acquired. Unlike graphs, which display an entire waveform that overwrites the data already stored, charts update periodically and maintain a history of the data previously stored.

Waveform Graphs

• Single Plot

A single plot can be drawn in two ways:

1. The graph accepts a single array of values and interprets the data as points on the graph and increments the x index by one starting at x = 0.

2. The graph also accepts a cluster of an initial x value, a (x, and an array of y data.

• Multiplot

A multiplot can be drawn in many ways. The easiest and the most common was is:

A multiplot waveform graph accepts 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. Wire a 2Darray data type to the graph, right-click the graph, and select Transpose Array from the shortcut menu to handle each column of the array as a plot.

XY Graphs

• Single Plot

A single plot can be drawn in two ways:

1. The single-plot XY graph accepts a cluster that contains an x array and a y array.

2. The XY graph also accepts an array of points, where a point is a cluster that contains an x value and a y value.

• Multiplot

A multiplot can be drawn in two ways:

1. The multiplot XY graph accepts an array of plots, where a plot is a cluster that contains an x array and a y array.

2. The multiplot XY graph also accepts an array of clusters of plots, where a plot is an array of points. A point is a cluster that contains an x value and a y value.

Waveform Chart

• Single Plot

You can pass charts a single value or multiple values at a time. The chart treats these inputs

as new data for a single plot.

• Multiplot

A multiplot can be drawn in three ways:

1. To pass data for multiple plots to a waveform chart, you can bundle the data together into a cluster of scalar numerics, where each numeric represents a single point for each of the plots.

2. If you want to pass multiple points for plots in a single update, wire an array of clusters of numerics to the chart. Each numeric represents a single y value point for each of the plots.

3. If you cannot determine the number of plots you want to display until run time, or you want to pass multiple points for multiple plots in a single update, wire a 2D array of data to the chart. As with the waveform graph, by default, waveform charts handle rows as new data for each plot. Wire a 2D array data type to the chart, right-click the chart, and select Transpose Array from the shortcut menu to treat columns in the array as new data for each plot.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download