Example Code

Single Plot with Color Change at Threshold

Code and Documents

Attachment

Overview:
This VI changes the color of a plot given a certain threshold.
Description:

In order to define the UI behavior of a plot color to be changed at a given threshold. Developers must manage 2 simultaneous plots for a single data set. When data is listed above a given threshold, Nan is entered into one plot, while values are entered in the other. Below a given threshold, the plot roles are reversed.

 

Property nodes may then be used to define custom plot colors. Their attributes can be viewed in the help for the VI. This VI takes an array of strings and renames each Line accordingly.

Requirements:

  • LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code:

  1. Run the VI.
  2. Modify the threshold and run it again.

 Additional Information or References

 

 Screenshot_1.png

 

Screenshot_2.png

"**This document has been updated to meet the current required format for the NI Code Exchange.**" 

Patrick Corcoran
Application Engineering Specialist | Control
National Instruments

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

Comments
LewVIEW
Member
Member
on

This is genious! Thanks