This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

How Can I Plot LabVIEW Graph/Chart with Two Different Scales?

Updated Nov 8, 2023

Environment

Software

  • LabVIEW

By default, waveform charts or graphs have only one X-axis and one Y-axis. As a particular consequence, some users might want to have two Y-scale axes on the left and right sides of the LabVIEW waveform charts or graphs.
This tutorial will show you how to add new axes with varying scales to LabVIEW charts or graphs. 

It is possible to plot data using different scales by using multiple axes on the same graph. Please follow the steps below.
 
  1. Place the chart or graph indicator on the front panel.
  2. Right-click the axis on which you want to create multiple scales and select Duplicate Scale. For example, if you want to create two different Y-axis scales for one X-axis scale, right-click the Y axis and choose Duplicate Scale.
  3. Right-click the second axis, select Swap Sides, and the second scale will be moved to the right side.
  4. Open the block diagram. Right-click the chart/graph icon and choose Create>>Property Node>>Active Plot.
  5. Place the property node anywhere on the block diagram.
  6. Right-click the ActPlot property node and select Change All To Write
  7. Extend the property node. Left click on the second property and select Plot>>Y Scale Index (when creating multiple Y axes).
  8. Wire numeric constants to the ActPlot and Plot.YScaledx property nodes.
Graph/Chart will be plotted on the default original scale unless you configure it using the property node. If you want to use a new scale for the plot, wire the plot number to the ActPlot and numeric constant 1 to Plot.YScaledx.

Figure 1 shows a simple example program of generating three plots, allocating the default axis of label name Temperature to the first two temperature vectors and allocating a new axis of label name Noise to the last plot, while Figure 2 shows the resulting waveform graph.
Figure 1: Configuring property node


Figure 2: Waveform graph of multiple Y axes