public Compute ( double values ) : void | ||
values | double | Array of values. |
return | void |
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); }
/// <summary> /// Displays a scatter plot with the specified data. /// </summary> /// /// <param name="title">The title for the plot window.</param> /// <param name="x">A two column matrix containing the (x,y) data pairs as rows.</param> /// <param name="z">The corresponding labels for the (x,y) pairs.</param> /// <param name="nonBlocking">If set to <c>true</c>, the caller will continue /// executing while the form is shown on screen. If set to <c>false</c>, /// the caller will be blocked until the user closes the form. Default /// is <c>false</c>.</param> /// public static ScatterplotBox Show(string title, double[][] x, int[] z = null, bool nonBlocking = false) { Scatterplot scatterplot = new Scatterplot(title); scatterplot.Compute(x, z); return show(scatterplot, nonBlocking); }
private static ScatterplotBox show(String title, Func<double, double> function, double? min, double? max, double? step, int? npoints = null) { if (min == null || max == null) { DoubleRange range; if (GetRange(function, out range)) { min = range.Min; max = range.Max; } else { min = 0; max = 1; } } if (npoints == null) npoints = 1000; if (step == null) step = (max - min) / npoints; double[] input = Vector.Interval(min.Value, max.Value, step.Value); double[] output = Matrix.Apply(input, function); Scatterplot scatterplot = new Scatterplot(title ?? "Scatter plot"); scatterplot.Compute(input, output); return show(scatterplot); }
/// <summary> /// Displays a scatter plot with the specified data. /// </summary> /// /// <param name="title">The title for the plot window.</param> /// <param name="x">A two column matrix containing the (x,y) data pairs as rows.</param> /// <param name="z">The corresponding labels for the (x,y) pairs.</param> /// public static ScatterplotBox Show(string title, double[][] x, int[] z) { Scatterplot scatterplot = new Scatterplot(title); scatterplot.Compute(x, z); return show(scatterplot); }
/// <summary> /// Displays a scatter plot with the specified data. /// </summary> /// /// <param name="title">The title for the plot window.</param> /// <param name="x">A two column matrix containing the (x,y) data pairs as rows.</param> /// public static ScatterplotBox Show(string title, double[,] x) { Scatterplot scatterplot = new Scatterplot(title); scatterplot.Compute(x); return show(scatterplot); }