Industrial Data Science
in C# and .NET:
Simple. Fast. Reliable.
 
 

ILNumerics - Technical Computing

Modern High Performance Tools for Technical

Computing and Visualization in Industry and Science

Box plots

BoxPlot enables you to create box plots. A box plot represents the distribution of data in a standardized way.

Using BoxPlot

To create an BoxPlot object, provide its constructor with:

  • A row vector X, containing the horizontal or vertical positions for each data set
  • A matrix Data, containing the data you wish to visualize

Hereby, each column of Data represents a data set. Note that the number of elements of the input parameter X and the number of columns of the input parameter Data must be equal. In the following graph you can see an BoxPlot object that is based on random numbers.

To modify the input parameters X and  Data of an existing ErrorBarPlot object, use the Update() method. Here, all input parameters are optional as shown in the example below.

When changing one or more of the 2 input parameters, make sure they are of same lengths.

Optional Parameters

Next to the mandatory input parameters, there is also a set of optional parameters such as:

  • boxWidth to determine the width of all box plots
  • drawScatteredPlot to draw the outliners or a complete scattered plot
  • drawVertical to plot vertical or horizontal box plots

Those can only be specified inside the constructor. On top of that, you will of course have access to common properties such as color, width and style of the line as well as color and style of the markers.

Note, that you can also specify the aforementioned common properties after creating the box plot as shown in the example below:

Further Configurations

Since BoxPlot derives from Group, you have access to all configuration options of common group objects.

More Information and limitations

There is only one limitation: The columns of Data have to have more than 3 elements.

For more detailed information and examples check out:

The box plot feature is available since version 4.12 of the ILNumerics Drawing2 module.