1.下载zedgraph.dll
2.添加zedgraph控件:打开工具栏右键单击,选择项->.Net Framework组件,浏览你下载的zedgraph.dll,点添加即可。zedgraph控件就出现在工具栏中。
3.把控件拖到form中
4.添加命名空间using zedgraph
5. Form1_Load中的代码如下:
private void Form1_Load(object sender, EventArgs e)
{
GraphPane myPane = zedGraphControl1.GraphPane;
// get a reference to the GraphPane
// Set the Titles
myPane.Title.Text = "My Test Graph\n(For CodeProject Sample)"; //修改title
myPane.XAxis.Title.Text ="X 坐标"; //修改X坐标的显示
myPane.YAxis.Title.Text = "Y 坐标"; //修改Y坐标的显示
double x, y1, y2;
PointPairList list1 = new PointPairList();