/// <summary> /// Draws the graph to the form /// </summary> /// <param name="o"></param> /// <param name="e"></param> public void PaintGraph(object o, PaintEventArgs e) { Graphics g = e.Graphics; // Create a new graph with topLeft at (40,40) and size 600x400 myPane = new ZedGraph.GraphPane(new Rectangle(this.Location.X, this.Location.Y + 210, 450, 325), "Allele Frequency\n", "Generations", "Frequency of A"); myPane.XAxis.Max = 100; //this.generation.Value; myPane.XAxis.Min = 0; myPane.YAxis.Max = 1; myPane.YAxis.Min = 0; ZedGraph.LineItem myCurve = myPane.AddCurve("1", list1, Color.Red, ZedGraph.SymbolType.None); ZedGraph.LineItem myCurve2 = myPane.AddCurve("2", list2, Color.Blue, ZedGraph.SymbolType.None); ZedGraph.LineItem myCurve3 = myPane.AddCurve("3", list3, Color.LimeGreen, ZedGraph.SymbolType.None); ZedGraph.LineItem myCurve4 = myPane.AddCurve("4", list4, Color.Black, ZedGraph.SymbolType.None); myPane.AxisChange(this.CreateGraphics()); myPane.Draw(e.Graphics); }