Example Code

XY Graph- Plotting Multiple Vector Segments on the Same XY Graph

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 shows how we can create multiple independent vectors on an XY Graph.

 

Description

To create multiple independent vectors on an XY Graph: 

  1. Create a 1-D array of X components and a separate 1-D array of Y components.
  2. Do this for each vector you want to add to the XY Graph.
  3. Each vector will have an X & Y component. Bundle each pair together using a Bundle function to create a cluster.
  4. Since the XY Graph requires an array of clusters we have to build an array using the Build Array function.
  5. Output the array of clusters to the XY Graph indicator.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI.
  2. You can change or add the X&Y components in Block Diagram to change the lines in XY Graph.

 

Additional Information or References

VI Snippet

1.png

 

 

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

Applications Engineer
National Instruments

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