private void DrawErrorResultGraph(IterationResult iteration) { ErrorResultGraph.GraphPane.CurveList.Clear(); PointPairList numList = new PointPairList(); ErrorResultGraph.GraphPane.XAxis.Scale.Min = 0; ErrorResultGraph.GraphPane.XAxis.Scale.Max = 1; double min = iteration.Points.Min(p => p.Error); double max = iteration.Points.Max(p => p.Error); ErrorResultGraph.GraphPane.YAxis.Scale.Min = Math.Min(min, _inputData.Eta) - 5; ErrorResultGraph.GraphPane.YAxis.Scale.Max = Math.Max(max, _inputData.Eta) + 5; ErrorResultGraph.GraphPane.Title.Text = "Finite Elements Error"; ErrorResultGraph.AxisChange(); ErrorResultGraph.Invalidate(); foreach (Point point in iteration.Points) { numList.Add(point.Middle, point.Error); } ErrorResultGraph.GraphPane.AddCurve("", numList, System.Drawing.Color.Blue, SymbolType.Star); ErrorResultGraph.GraphPane.AddCurve("", new PointPairList { { -100, _inputData.Eta }, { 100, _inputData.Eta } }, System.Drawing.Color.Red, SymbolType.None); ErrorResultGraph.AxisChange(); ErrorResultGraph.Invalidate(); }
public void InitializeGraphPane() { FunctionResultGraph.GraphPane.XAxis.Scale.Min = 0; FunctionResultGraph.GraphPane.XAxis.Scale.Max = 1; FunctionResultGraph.GraphPane.YAxis.Scale.Min = 0; FunctionResultGraph.GraphPane.YAxis.Scale.Max = 10; FunctionResultGraph.GraphPane.Title.Text = ""; FunctionResultGraph.GraphPane.XAxis.Title.Text = "x"; FunctionResultGraph.GraphPane.YAxis.Title.Text = "u(x)"; FunctionResultGraph.IsShowPointValues = true; FunctionResultGraph.AxisChange(); FunctionResultGraph.Invalidate(); ErrorResultGraph.GraphPane.XAxis.Scale.Min = 0; ErrorResultGraph.GraphPane.XAxis.Scale.Max = 1; ErrorResultGraph.GraphPane.YAxis.Scale.Min = 0; ErrorResultGraph.GraphPane.YAxis.Scale.Max = 10; ErrorResultGraph.GraphPane.Title.Text = ""; ErrorResultGraph.GraphPane.XAxis.Title.Text = "x"; ErrorResultGraph.GraphPane.YAxis.Title.Text = "η, in %"; ErrorResultGraph.IsShowPointValues = true; ErrorResultGraph.AxisChange(); ErrorResultGraph.Invalidate(); }