0
下面的图是使用MATLAB创建的。我想在windows窗体中使用excact同样的情节。在.NET中以相同的x值绘制几个Y值
但是,它不工作了绘制几个y值到一个x值(在这种情况下:0)。
我的代码
this.chart3.Series["Series1"].Points.Clear();
this.chart3.Series["Series1"].Points.AddXY(0, doubleValueArray); //length is 1600
this.chart3.Update();
,但我得到的错误
Exception was thrown: Series data points do not support values of type
System.Double[] only values of these types can be used: Double, Decimal,
Single, int, long, uint, ulong, String, DateTime, short, ushort.
...我不明白,因为根据该documentation的AddXY的第二个参数接受一个双数组。
我是否需要设置其他内容在属性?
感谢所有帮助
只有像BoxPlot这样的几个charttypes才能将y值接受为数组。对于点行类型,每个数据点需要一个x值和一个y值。 – TaW