Accord.NET 框架中的多个图

Multiple Plots In Accord.NET Framework

我有一个数据集和假设函数,但不能将它们合二为一,有什么建议吗? 我用了

ScatterplotBox.Show("Training data",x,y);
ScatterplotBox.Show("Training data",area.ToArray(),h);

您可以改用 ScatterplotView,但您还需要 Form 来固定它。看看:

    static void Main(string[] args)
    {
        Random r = new Random();

        int max = 15;

        double[] x = new double[max];
        double[] y1 = new double[max];
        double[] y2 = new double[max];

        for (int i = 0; i < max; i++)
        {
            x[i] = i;
            y1[i] = r.Next(0, 50);
            y2[i] = r.Next(50, 100);
        }

        ScatterplotView spv = new ScatterplotView();
        spv.Dock = DockStyle.Fill;
        spv.LinesVisible = true;

        spv.Graph.GraphPane.AddCurve("Curve 1", x, y1, Color.Red, SymbolType.Circle);
        spv.Graph.GraphPane.AddCurve("Curve 2", x, y2, Color.Blue, SymbolType.Diamond);

        spv.Graph.GraphPane.AxisChange();

        Form f1 = new Form();
        f1.Width = 600;
        f1.Height = 400;
        f1.Controls.Add(spv);
        f1.ShowDialog();

        Console.ReadLine();
    }