Example Code

Graph Plot Names and Colours in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example programmatically changes the plot names and colours on a Waveform Graph which contains multiple plots.

 

Description

This is a simple example that programmatically changes the plot names and colours on a Waveform Graph which contains multiple plots. This could be used in an application where data channels are selected but may not always be used.

The basic operation of this VI is to read an array of strings into a For loop with auto-indexing enabled. The For loop will execute for however many entries there are in the array. The selected plot is set by the iteration of the loop. The colour of the plot also changes based on the Plot name.

 

Requirements

LabVIEW Base Development System 2012 or compatible

 

Steps to Implement or Execute Code

  1. Fill the new Channel Names and Color into the Cluster array
  2. Run the VI

 

Additional Information or References

VI Block Diagram

 

9787.PNG

The Color Box allows you to change the colour of the plot.

 

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

Jason W.
Applications Engineer
National Instruments UK & Ireland

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

Comments
scubadude
Member
Member
on

Do you know if it is possible to change the plot names on a waveforem chart (not a graph)?