Why is ZedGraph not drawing second curve?

49 views Asked by At

I have a program that needs to draw two sin curves on the graph, but when I try it only shows the first one. The label of the second one is shown, but that's all. I need to do it on version 4.2.1.35091.

public void drawSin(byte[] answer1, byte[] answer2)
    {   
        graphPane1 = zedGraphControl1.GraphPane;
        try
        {
            byte[] answerU1 = new byte[10000];
            byte[] answerI1 = new byte[10000];
            byte[] answer41 = new byte[1600];
            byte[] answer42 = new byte[1600];
            Point[] ptsU1 = new Point[800];
            Point[] ptsI1 = new Point[800];
            Point[] ptsU3 = new Point[800];
            int[] bufU1 = new int[800];
            int[] bufI1 = new int[800];
            int[] bufU3 = new int[800];
            PointPairList pointListU1 = new PointPairList();
            PointPairList pointListI1 = new PointPairList();
            PointPairList pointListU3 = new PointPairList();
            Pen pen = new Pen(Brushes.Black, 1.5f);
            
            answerU1 = answer1;
            answerI1 = answer2;
            
            convertByteToInt(answerU1, ptsU1);
            convertByteToInt(answerI1, ptsI1);

            getPoints(ptsU1, pointListU1);
            getPoints(ptsI1, pointListI1);

            zedGraphControl1.GraphPane.CurveList.Clear();
            graphPane1.AddCurve("U1", pointListU1,Color.Red,SymbolType.None);
            graphPane1.AddCurve("I1", pointListI1, Color.Blue, SymbolType.None);

            zedGraphControl1.AxisChange();
            zedGraphControl1.Invalidate();
                                
        }
        catch(Exception ex)
        {
            MessageBox.Show(ex.ToString());
        }

}

0

There are 0 answers