XY Graphs


The waveform graphs you have been using are designed for plotting evenly sampled waveforms. However, if you sample at irregular intervals or are plotting a math function that has multiple Y values for every X value, you will need to specify points using their (X, Y) coordinates. XY graphs plot this different type of data; they require input of a different data type than waveform graphs. A single-plot XY graph and its corresponding block diagram are shown in Figures 8.24 and 8.25.

Figure 8.24. Front panel with an XY Graph displaying XY data


Figure 8.25. Block diagram generating XY data and displaying it in an XY Graph


For a single-plot, the XY graph expects an input of a bundled X array (the top input) and Y array (the bottom input). The Bundle function (Programming>>Cluster & Variant palette) combines the X and Y arrays into a cluster wired to the XY graph. The XY graph terminal now appears as a cluster indicator, as shown in Figure 8.25.

Hover over an XY graph's terminal with the Context Help window open (as shown in Figure 8.26) to see a detailed description of the single-plot and multi-plot data types that you can wire into an XY graph.

Figure 8.26. XY graph terminal's context help


For a multiple-plot XY graph, simply build an array of the single-plot clusters (of X and Y array values), as shown in Figure 8.27.

Figure 8.27. Multi-plot (1D array of single-plot clusters)


It is very easy to confuse the Bundle and Build Array functions when assembling data for graphs! Pay close attention to which one you need to use!


It is not mentioned in the Context Help window documentation for the XY graph, but you can also create a single plot from an array of XY cluster "coordinate pairs," as shown in Figure 8.28. The only downside of this single plot format is that you cannot create a multi-plot by building an array of this type of single plots.

Figure 8.28. XY coordinate pair array single plot


For some online graph examples, look at Waveform Graph.vi and XY Graph.vi in the EVERYONE\CH08 directory.


Showing Optional Planes in an XY Graph

The XY graph allows you to show special grid lines, called "planes," by selecting them from its Optional Plane pop-up submenu. You can choose from Nyquist, Nichols, S, and Z planes. These planes are very useful in Radio Frequency (RF) as well as Sound and Vibration analysis, where signals are analyzed in the frequency domain, rather than time domain. You can show or hide the Cartesian (XY) grid lines by checking or unchecking (respectively) the Optional Plane>>Show Cartesian Lines from the XY graph's pop-up menu. The Optional Plane submenu also contains options to show and hide the plane labels and the plane lines for the selected plane. Figures 8.29 and 8.30 show XY graphs with Nyquist and Z planes visible (respectively). Note that the lines shown on the plots are grid lines, not data being displayed.

Figure 8.29. XY graph with Nyquist plane visible


Figure 8.30. XY graph with Z plane visible





LabVIEW for Everyone. Graphical Programming Made Easy and Fun
LabVIEW for Everyone: Graphical Programming Made Easy and Fun (3rd Edition)
ISBN: 0131856723
EAN: 2147483647
Year: 2006
Pages: 294

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net