SampleApp.MainForm.CreateScatterplot C# (CSharp) Method

CreateScatterplot() public method

public CreateScatterplot ( ZedGraphControl zgc, double x, double y, double slr, double rlr, double inliersX, double inliersY ) : void
zgc ZedGraphControl
x double
y double
slr double
rlr double
inliersX double
inliersY double
return void
        public void CreateScatterplot(ZedGraphControl zgc, double[] x, double[] y, double[] slr, double[] rlr,
            double[] inliersX, double[] inliersY)
        {
            GraphPane myPane = zgc.GraphPane;
            myPane.CurveList.Clear();

            // Set the titles
            myPane.Title.IsVisible = false;
            myPane.Chart.Border.IsVisible = false;
            myPane.XAxis.Title.Text = "X";
            myPane.YAxis.Title.Text = "Y";
            myPane.XAxis.IsAxisSegmentVisible = true;
            myPane.YAxis.IsAxisSegmentVisible = true;
            myPane.XAxis.MinorGrid.IsVisible = false;
            myPane.YAxis.MinorGrid.IsVisible = false;
            myPane.XAxis.MinorTic.IsOpposite = false;
            myPane.XAxis.MajorTic.IsOpposite = false;
            myPane.YAxis.MinorTic.IsOpposite = false;
            myPane.YAxis.MajorTic.IsOpposite = false;
            myPane.XAxis.Scale.MinGrace = 0;
            myPane.XAxis.Scale.MaxGrace = 0;
            myPane.YAxis.Scale.MinGrace = 0;
            myPane.YAxis.Scale.MaxGrace = 0;


            PointPairList list1 = new PointPairList(x, y);
            PointPairList list2 = null;
            PointPairList list3 = null;
            PointPairList list4 = new PointPairList(inliersX, inliersY);

            if (slr != null)
                list2 = new PointPairList(x, slr);
            if (rlr != null)
                list3 = new PointPairList(x, rlr);
            if (inliersX != null)
                list4 = new PointPairList(inliersX, inliersY);

            LineItem myCurve;

            // Add the curves
            myCurve = myPane.AddCurve("Inliers", list4, Color.Blue, SymbolType.Circle);
            myCurve.Line.IsVisible = false;
            myCurve.Symbol.Fill = new Fill(Color.Blue);

            myCurve = myPane.AddCurve("Points", list1, Color.Gray, SymbolType.Circle);
            myCurve.Line.IsVisible = false;
            myCurve.Symbol.Border.IsVisible = false;
            myCurve.Symbol.Fill = new Fill(Color.Gray);

            myCurve = myPane.AddCurve("Simple", list2, Color.Red, SymbolType.Circle);
            myCurve.Line.IsAntiAlias = true;
            myCurve.Line.IsVisible = true;
            myCurve.Symbol.IsVisible = false;

            myCurve = myPane.AddCurve("RANSAC", list3, Color.Blue, SymbolType.Circle);
            myCurve.Line.IsAntiAlias = true;
            myCurve.Line.IsVisible = true;
            myCurve.Symbol.IsVisible = false;


            zgc.AxisChange();
            zgc.Invalidate();
        }

Same methods

MainForm::CreateScatterplot ( ZedGraphControl zgc, double graph ) : void
MainForm::CreateScatterplot ( ZedGraphControl zgc, double graph, int n ) : void
MainForm