title: How to delete old curve in ZedGraph C#
body: <p>I have this method:</p>
  
  <pre><code>private void plotGraph(List&lt;float&gt; data)
      {
          GraphPane myPane = zedGraphControl1.GraphPane;
  
          // Set the Titles
          myPane.Title.Text = "Symulacja";
          myPane.XAxis.Title.Text = "Czas";
          myPane.YAxis.Title.Text = "Wartość sygnału";
          myPane.XAxis.Scale.Max = 20;
          myPane.YAxis.Scale.Max = 5;
          myPane.YAxis.Scale.Min = -5;
  
          PointPairList PairList = new PointPairList();
  
          double x = 0;
  
          for (int i = 0; i &lt;= 1000; i++)
          {
  
              PairList.Add(x, data[i]);
              x += 0.01;
          }
  
  
          LineItem ACurve = myPane.AddCurve("Team A", PairList, Color.Red, SymbolType.None);
           zedGraphControl1.Refresh();
  
          zedGraphControl1.AxisChange();
  
      }
  </code></pre>
  
  <p>And the first time I call it everything is ok, the function plots the plot i want (the Y values of the points are from the list data). Now the second and every other time i call it, there is a new line drawn over the first one (the old one stays on the chart). I would like the old one to dissapear when a new one is plotted, what should I do to get this effect?</p>