Example: XYGraph

Measurement Studio User Interface

Example: XYGraph

Uses the PlotXY and PlotXvsY methods of the CWGraph.

Description

This example demonstrates the PlotXY and the PlotXvsY methods of the CWGraph. The difference between the two methods is that the PlotXY plots a 2D array of data. The first row is the x values while the subsequent rows are the y values for each plot. The PlotXvsY method plots a 1D or 2D array of y data against a 1D array of x data. Each row of y values generates a plot. This example also demonstrates how to chart points using the PlotY method. This method is used in the X Data and Y Data plots.

To begin this example, press any of the buttons. The PlotXY One Waveform and the PlotXY Multiple Waveforms buttons use the PlotXY method to plot a graph on the main graph and chart and x and y values on the XY Data graph. The PlotXvsY One Waveform and PlotXvsY Multiple Waveforms buttons use the PlotXvsY method to plot the graphs on the main graph. The x and y values appear on the X Data and Y Data charts respectively. You can also press the Plot Circle, Plot Octagon, Polar Plot, and Plot Spiral buttons to make those shapes. The x and y values will also appear on the X Data and Y Data graphs respectively.

Example Location

Samples\UI\Graph\XY Graph