Accord.Statistics.Visualizations.Scatterplot.Compute C# (CSharp) Method

Compute() public method

Computes the scatter plot.
public Compute ( double data, int labels ) : void
data double Array of { x,y } values.
labels int Array of integer labels defining a class for each (x,y) pair.
return void
        public void Compute(double[][] data, int[] labels)
        {
            if (data == null)
                throw new ArgumentNullException("data");

            if (labels == null)
                throw new ArgumentNullException("labels");

            if (data.Length != labels.Length)
                throw new DimensionMismatchException("labels",
                    "The labels array should have the same length as the data array.");

            for (int i = 0; i < data.Length; i++)
                if (data[i].Length != 2)
                    throw new DimensionMismatchException("data", "The matrix should have two columns.");

            compute(data, labels);
        }

Same methods

Scatterplot::Compute ( double values ) : void
Scatterplot::Compute ( double x, double y ) : void
Scatterplot::Compute ( double x, double y, int labels ) : void

Usage Example

        public void ComputeTest2()
        {
            ScatterplotView target = new ScatterplotView();

            Scatterplot histogram = new Scatterplot();
            histogram.Compute(new double[] { 200.0, 200.0, 200.0 });

            target.DataSource = null;

            target.DataSource = histogram;

            target.DataSource = null;

            // ScatterplotBox.Show(histogram);
        }
All Usage Examples Of Accord.Statistics.Visualizations.Scatterplot::Compute