Color currentColor = myColorArr[0];<br /> //int startidx = 0;<br /> for (int i = 0; i < datacount; i++)<br /> {<br /> if (currentColor == myColorArr[i])<br /> {<br /> list_x.Add(list_x[i]);<br /> list_y.Add(list_y[i]); <br /> }<br /> else<br /> {<br /> list_x.Add(list_x[i]);<br /> list_y.Add(list_y[i]);<br /> <br /> LineItem myCurve1 = myPane1.AddCurve("", list_x.ToArray(), list_y.ToArray(), myColorArr[i-1],SymbolType.Diamond);<br /> myCurve1.Line.IsVisible = true; // was false for scatter plot<br /> myCurve1.Symbol.Fill = new Fill(myColorArr[i - 1]);<br /> list_x.Clear();<br /> list_y.Clear();<br /> currentColor = myColorArr[i];<br /> list_x.Add(list_x[i]);<br /> list_y.Add(list_y[i]); <br /> }<br /> }

Thanks for your help!