为什么ZedGraph不绘制第二条曲线?

问题描述

我有一个程序需要在图形上绘制两条正弦曲线,但是当我尝试时,它仅显示第一个。显示了第二个的标签,仅此而已。我需要在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());
        }

}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)