NMath Stats User's Guide

TOC | Previous | Next | Index

1.6 Visualization (.NET, C#, CSharp, VB, Visual Basic, F#)

NMath Stats can be easily combined with the free Microsoft Chart Controls for .NET to create a complete data analysis and visualization solution. The Microsoft Chart Controls for .NET are available as a separate download for .NET 3.5. Beginning in .NET 4.0, the Chart controls are part of the .NET Framework.

NMath Stats provides convenience methods for plotting NMath Stats types using the Microsoft Chart Controls. For example, this code plots the probability density function (PDF) of the specified gamma distribution:

Code Example – C# charts

double alpha = 9.0;
double beta = 0.5;
var gamma = new GammaDistribution( alpha, beta );

NMathStatsChart.Show( gamma, 
  NMathStatsChart.DistributionFunction.PDF );

Figure 1 – Gamma distribution PDF

For more information, see the CenterSpace whitepaper "NMath Stats Visualization Using the Microsoft Chart Controls."