如何使用以下点画图啊??
         X                Y
2005-05-10 00:00:00    1063.43    
2005-05-10 00:05:00    1004.45    
2005-05-10 00:10:00    1018.14    
2005-05-10 00:15:00    1036.73   
2005-05-10 00:20:00    1036.45   
2005-05-10 00:25:00    1039.63  
2005-05-10 00:30:00    1045.05   
2005-05-10 00:35:00    1052.95    
2005-05-10 00:40:00    1056.20   
2005-05-10 00:45:00    1068.58    
2005-05-10 00:50:00    1038.08    
2005-05-10 00:55:00    1020.30    
2005-05-10 01:00:00    1056.71    
2005-05-10 01:05:00    1039.39 
2005-05-10 01:10:00    1033.99  
横坐标是时间,纵坐标是数值,还有如何进行坐标的标注呢??怎么编程实现啊?高手帮帮忙,好急的!!

解决方案 »

  1.   

    在www.codeproject.com上好像有个绘图的控件,挺好用的,去艘艘吧
      

  2.   

    g.drawString自己画的坐标上去吧。我最新也在写类似的东西
    --------------------------------------------
           www.coderpub.com
      

  3.   

    没有具体要求的话,GDI+中很容易,就是画线,写文本。
    Graphics.DrawLines,DrawString
      

  4.   

    private Graphics g;form_load()
    {
    g=this.CreateGraphics();
    }
    button_click()
    {
    try
    {
    StreamRead sr=new StreamRead("test.txt");
    float x1=0;
    float y1=0;
    float x2=0;
    float y2=0;
    while ((sr.Readline())!=null)
    {
    string tmp=sr.Readline();
    string x=tmp.split(' ')[0]+tmp.split(' ')[1];
    string y=tmp.split(' ')[2];
    Point p1=new Point(x1,y1);
    x2=x1+5;
    y2=System.Convert.ToSingle(y);
    Point p2=new Point(x2,y2);
    g.DrawLine(this.Pen,p1,p2);
    x1=x1+5;
    y1=y2;
    }
    }
    catch{}
    }你自己试一下,我没装.net,随便写的.还不晓得对不对.大致思路是这样的.
      

  5.   

    用ZedGraph控件划阿,很爽的,横坐标应该不用管他,只要间隔是一样的就行了,大致确定好y的最大值,然后就打点行了例如:
    PointPairList list = new PointPairList();      // in ZedGraph
    for ( int i=0; i<400; i++ )
    {
    double x = (double) i;
    double y = Math.Sin( (double) i * Math.PI / 15.0 ) * 16.0;
    list.Add( x, y );
    }