블로그 이미지
생각처럼

카테고리

전체보기 (209)
TOOL (1)
다이어리 (1)
Bit (200)
HELP? (0)
Total
Today
Yesterday

달력

« » 2025.1
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

태그목록

최근에 올라온 글

private void CreateZedgraph() //그래프 그리기 함수 정의
        {
            try
            {

                GraphPane mypane = zgc.GraphPane;

                mypane.CurveList.Clear(); //기존의 그래프 삭제

                mypane.Title.Text = "적합도 분포 산출";
                mypane.XAxis.Title.Text = "시간";
                mypane.YAxis.Title.Text = "적합도";

                PointPairList G1 = new PointPairList();
                PointPairList G2 = new PointPairList();
                for (int i = 0; i < dataGridView1.Rows.Count - 1; i++)
                {
                    G1.Add(Convert.ToDouble(dataGridView1.Rows[i].Cells[6].Value), Convert.ToDouble(dataGridView1.Rows[i].Cells[2].Value));
                    G2.Add(Convert.ToDouble(dataGridView1.Rows[i].Cells[6].Value), Convert.ToDouble(dataGridView1.Rows[i].Cells[5].Value));
                }
                LineItem mycurve = mypane.AddCurve("G1", G1, Color.Green);
                LineItem mycurve2 = mypane.AddCurve("G2", G2, Color.Blue);

                //mycurve.Line.Fill = new Fill(Color.White, Color.Green, 45F);
                //mycurve.Symbol.Fill = new Fill(Color.White);

                //mycurve2.Line.Fill = new Fill(Color.White, Color.Blue, 45F);
                //mycurve2.Symbol.Fill = new Fill(Color.White);

                mypane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45F);
                mypane.Fill = new Fill(Color.White, Color.FromArgb(220, 220, 255), 45F);
                zgc.AxisChange();
                zgc.Refresh();
            }
            catch
            {
                MessageBox.Show("그래프를 구현할수 없습니다", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

Posted by 생각처럼
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함