This code shows how to programmatically select which plot corresponds to which Y-Axis.
This code plots random values between 0-1 on one plot and random values between 0-10 on another plot on the same XY-Graph. It uses two Y-scales and property nodes determine which plot corresponds to which scale.
Steps to Implement or Execute Code
- Create two arrays of random numbers using a for loop.
- Build these arrays into one array and input this 2D array into a Waveform Graph.
- Create a property node for the Waveform Graph and expand it to show 5 properties.
- Set these properties to XScale.Muptiplier, ActPlot, Plot.YScaleInx, ActPlot, and Plot.YScaleInx.
- Create a control to adjust the X-Axis Scaling Factor.
- Wire the other properties to constants corresponding to the indexes of the Plots and Y-Scales that you would like to pair.
AxisScaling13.vi was written in LabVIEW 2013.
AxisScaling85.vi was written in LabVIEW 8.6.