清空面板
zedGraphControl.GraphPane.CurveList.Clear();
重绘后需要
ZedGraphControl.Refresh();
简单的折线图绘图函数例子
private void CreateGraphWithSelectedData(ZedGraphControl zgc, PointPairList data)
{
// get a reference to the GraphPane
GraphPane myPane = zgc.GraphPane;
// Set the Titles
myPane.Title.Text = "数据分布图";
myPane.XAxis.Title.Text = "序号";
myPane.YAxis.Title.Text = "时间";
LineItem myCurve = myPane.AddCurve("Piper",
data, Color.Blue, SymbolType.Circle);
// Tell ZedGraph to refigure the
// axes since the data have changed
zgc.AxisChange();
}
//未验证代码,删除指定曲线
To remove just one PieItem object:
Dim zgc As ZedGraph.ZedGraphControl = Me.ZedGraphControl1
Dim zgPane As ZedGraph.GraphPane = zgc.GraphPane
Dim zgPieItem As ZedGraph.PieItem = zgPane.CurveList("PieItemLabel")
zgPane.CurveList.Remove(zgPieItem)
来源:http://blog.163.com/gjx0619@126/blog/static/1274083932012310105710710/