C#WindowsFormsApplication根据坐标绘制简易折线图

Point[] pot = { new Point(0, 123), new Point(50, 148), new Point(100, 118), new Point(150, 192), new Point(200, 176), 
                      new Point(250, 237), new Point(300, 320), new Point(350, 450), new Point(400, 219), new Point(450, 180), new Point(500, 170)};
        private void Form1_Paint()
        {
            Graphics gobj = this.CreateGraphics();
            gobj.DrawCurve(new Pen(Color.Blue, 2), pot, 0f);//数据间连曲线
            gobj.Dispose();
        }
private void button2_Click(object sender, EventArgs e)
        {
            Form1_Paint();
        }

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_41170600/article/details/106061516
今日推荐