It has been a long time since I have used ZedGraph, but I think that the code sample you have shown just clears the points list of the curve at Index=0.
Try using something like shown below. I have not tested this as I would have to download a copy of ZedGraph and frustrate myself trying to remember the all the parts needed to create a graph . :)
ZedGraph.CurveItem toggledcurve = your curve definition;
if (chkXScale.Checked)
{
zedGraphControl1.GraphPane.CurveList.Remove(toggledcurve);
}
else
{
zedGraphControl1.GraphPane.CurveList.Add(toggledcurve);
}
zedGraphControl1.Refresh();
On another note, I thought they stopped development of ZedGraph when MS released the Chart control. Is it active again somewhere? SourceForge still shows 2008 as the last update.