Example Code

Creating Boxplots Using 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

Download All

Overview

This example demonstrates how to create box plot for interpreting the distribution of data.

 

Description

Data can be displayed in many ways in LabVIEW. One method of displaying a set of data is with a box-and-whisker plot: also known as Boxplots. These plots are helpful in interpreting the distribution of data. Rather than showing the entire dataset these plots produce a five number summary consisting of the median, the quartiles and the max/min values in the distribution.

On the NI Developer Zone, there is an article concerning this, NI Developer Zone: Boxplots and Stem-and-Leaf Displays. The article contains a VI library which takes in a 2D array and generates the plots on an XY graph. The article also covers how the VIs work.

 

Requirements

Software:

  • LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code

1. Run VI.
2. Observe the plot regarding your inputs on the front panel.

 

Additional Information or References 

 

2012.png 

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

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉

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

Comments
ron_wood
Member
Member
on

http://zone.ni.com/devzone/cda/tut/p/id/3047#toc2

Figure 2 depicts multiple boxplots on one graph..

but it is completely unclear how to do this, there is no multiboxplot implementation example anywhere.

Figure 2 should have been an example!

Hillman
Active Participant
Active Participant
on

Hi Ron Wood,

I no longer work for NI so I would recommend posting your question on the forum or contact your local sales office.

However, at the time I did make this work with multiple plots. I think all you need to do is expand the data input control as its a 2D array. The format plot subVI should resize the graph to display both plots.

Hope this helps,

James

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Craig_
Active Participant
Active Participant
on

I spent some time improving this code, you find a version which supports multiple plots here:

https://decibel.ni.com/content/docs/DOC-42016

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023