From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Graph Extensions for 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 allows real time feedback and mouse actions on any graph and one can easily add them to the project with existing graphs and data to improve them.
Description
Currently, there are 6 main extensions:

  • Cursors - Show real time overlay of data values and time at the cursor and plot intersections
  • Graph BGK Colors - Lets one set bgk color where the minor and major grid colors are
  • Peaks and Valleys - Allow one to highlight on the graph any # of peaks and valleys from the data
  • Markers - Interactive labels and regions to mark up the graph.
  • Mouse Zoom - mouse based scroll zooming for graphs
  • Plot Highlighter - for when one need to visually highlight a plot (on change or user selection or new data for example)

So, the code is available as open source on GitHub:

https://github.com/unipsycho/Graph-Extensions-LabVIEW

Video Preview of Graph Extensions

 


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Open the Graph Extensions 2012 NIVerified.lvproj.
  2. open any of the main VI and operate according to the instructions.

 

Additional Information or References
VI Block Diagram

 code1.pngcode2.png

 

 

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

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

Comments
chih-ting
Active Participant
Active Participant
on

Hi Mike,

Great Job!

Thanks for sharing and posting a video.

Is it possible to convert it to LabVIEW 2014?

Thanks,

Ryan

Mike_King
Member
Member
on

BTW: this library is in the tools network now and is available in 2013.  You can also grab it from github for the latest developer builds.

Mrmas
Member
Member
on

Hi Mike,

 

Could you provide a link for this library on the tools network? 

 

I can not find it with searching.

 

Very nice graph additions by the way, thank you very much for making this.

 

Regards

Mike_King
Member
Member
on

I never published it in the tools network, too time consuming.  Its available for download on github, links at the top of post.

Mrmas
Member
Member
on

I see. I will look at github. 

 

Thanks.

Sarah_LAB
Member
Member
on

Hi Mike_King,
I want to thank you very much , really nice job.

I wanted to use your graph tool and use a normal graph(waveform graph) instead of XY Graph but it does not work I I give  you the pictures of my proramme for you check What is missing, I need your help too much, this tool in my project of my university ?

1.png2.png
project : http://www.mediafire.com/file/4dsqnhhnqcml155/Example+XYGraph+Cursors.vi

Thank you for your help.
SARAH.

Mike_King
Member
Member
on

Hi, there are a lot of references to change and fix with different graph types as well as a few different methods for the XY coordinates that are different so you'll have to dig into that if you intend to change the graph type.  This is exactly why I used an XY graph, its easier. I would actually suggest converting your waveform data into the same formats as the XY grpah supports, which would be much easier than changing the whole library and many methods to support the waveform graph type.  Plus, you have to know which datatypes you want to build/support for waveform, since they actually support quite a few formats and the XY interpolators will have to adjust for each type.

Sarah_LAB
Member
Member
on

Hi Mike_King
Thank you for your help, Unfortunately that does not work with waveform Graph ,i wait to improve your program,
In my situation I wanted to display a table of 2D in XY Graph, it works perfectly with the waveform graph but I dont think than it will also work with the XY graph ??
If i was able to display this array of 2D in XY graph i will have solved my problem!!
thank you for your attention .

Sarah_LAB
Member
Member
on

It's fine, thank you
I found the solution

Yuanxj
Member
Member
on
good share