Example: Cursors
Uses cursors to interact with data plotted on a CWGraph.
Description
This example demonstrates the different ways you can use cursors to interact with the graph.
To begin this example, select whether you want random data or a sine wave. Press the Generate Data button to see 100 points displayed on the graph. Using the Graph Operations on the user interface, you can zoom, pan, or have two different types of cursors. When in the zoom mode, you can use your mouse to zoom into a selected area. Use the Zoom Out button to see the original plot after zooming in. The Autoscale button will autoscale the axes. Using the pan mode, you can set the extents of the X and Y axes by dragging the plot area with the mouse. If you choose the Cursor Coordinates option, a crosshair appears on the graph. If the Cursors toggle is set to Float Free, then you can move the crosshair anywhere on the graph. The Snap to Plot mode only allows the crosshair to move along the curve. The value of the X and Y coordinates of the intersection appears in the Cursor Information area. If you choose the Cursor Measurements, another crosshair appears on the graph. This crosshair moves in the same way as the previous one, but it measures the distance between the X and Y coordinates of the intersection of the two crosshairs. This information is displayed in the Cursor Measurements area.
Example Location
Samples\UI\Graph\Cursors