Example Code

Adding Multiple X- and Y-Scales on Charts and Graphs

Code and Documents

Attachment

This example walks you through creating a Multi-scale Waveform Chart. Do the following operations on the attached Single Scale Chart VI, to arrive at the attached Multiple Scale Chart VI.

Complete the following steps to add a scale to a waveform chart or graph.

1. Depending on which scale you want to add, right-click the x- or y-scale of the waveform chart or graph and select Duplicate Scale from the shortcut menu.

2. To move the new scale to the opposite side of the display, right-click the new scale and select Swap Sides from the shortcut menu.

3. Associate a plot to the new scale by right-clicking the plot in the Plot Legend and select from the X-Scale or Y-Scale shortcut items. If the Plot Legend is not visible, right-click the chart or graph and select Visible Items»Plot Legend from the shortcut menu.

4. To change the range of a scale, use the Operating tool or the Labeling tool to highlight the end value(s) of the new scale and enter a new value.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors