예제 #1
0
        private void CreateGraph(ZedGraphControl zgc)
        {
            GraphPane     myPane   = zgc.GraphPane;
            PointPairList listPrev = new PointPairList();
            PointPairList list     = new PointPairList();

            myPane.CurveList.Clear();
            myPane.Title = "Picture";

            for (int i = 0; i < Program.yPrev.Count; i++)
            {
                listPrev.Add(i, Program.yPrev[i]);
            }
            LineItem myCurve = myPane.AddCurve("Prev",
                                               listPrev, Color.Red, SymbolType.None);

            for (int j = 0; j < Program.y.Count; j++)
            {
                list.Add(j, Program.y[j]);
            }

            LineItem myCurve2 = myPane.AddCurve("Result",
                                                list, Color.Blue, SymbolType.None);


            zgc.AxisChange();
            zgc.Invalidate();
            zgc.Show();
        }
예제 #2
0
        private void adicionar_grafico()
        {
            zg1.Dock      = DockStyle.Fill;
            zg1.GraphPane = new GraphPane(new RectangleF(), "Dados Lidos", "Index", "Volts");
            //emgLine.Color = Color.Blue;
            emgLine = new LineItem("EMG", new double[1000], new double[1000], Color.Blue, SymbolType.None);

            //emgLine = new LineItem("EMG");
            //emgLine.Symbol = Symbol.None;
            //emgLine.AddPoint(0, 0.0);
            //emgLine.AddPoint(1, 2.0);
            zg1.GraphPane.CurveList.Add(emgLine);
            zg1.AxisChange();
            zg1.Invalidate();
            zg1.Show();
            metroPanel2.Controls.Add(zg1);
        }
예제 #3
0
        private void CreateGraph(ZedGraphControl zgc)
        {
            GraphPane     myPane = zgc.GraphPane;
            PointPairList list   = new PointPairList();

            myPane.CurveList.Clear();
            for (int i = 0; i < Program.y.Count; i++)
            {
                list.Add(i, Program.y[i]);
            }
            myPane.Title = "";
            LineItem myCurve = myPane.AddCurve("Result",
                                               list, Color.Purple, SymbolType.None);

            zgc.AxisChange();
            zgc.Invalidate();
            zgc.Show();
        }
        public void CreateGraph(ZedGraphControl zgc)
        {
            GraphPane     myPane      = zgc.GraphPane;
            PointPairList listControl = new PointPairList();
            PointPairList list        = new PointPairList();

            myPane.CurveList.Clear();
            myPane.Title = "Picture";

            for (int i = 0; i < Program.u.Count; i++)
            {
                listControl.Add(i, Program.u[i]);
            }
            LineItem myCurve = myPane.AddCurve("Control",
                                               listControl, Color.Blue, SymbolType.None);

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