【发布时间】:2015-08-07 11:30:02
【问题描述】:
我有一个包含 42 个双精度值的数组 (double[] data = new double[42];)。现在我想用 oxyplot 图表可视化这些数据,但我没有弄清楚我该怎么做,因为在网站上给出了以下示例:
public class MainViewModel
{
public MainViewModel()
{
this.Title = "Example 2";
this.Points = new List<DataPoint>
{
new DataPoint(0, 4),
new DataPoint(10, 13),
new DataPoint(20, 15),
new DataPoint(30, 16),
new DataPoint(40, 12),
new DataPoint(50, 12)
};
}
public string Title { get; private set; }
public IList<DataPoint> Points { get; private set; }
}
我还必须可视化另一个具有 16'064 双值的数组。我想你可以想象我正在寻找一种尽可能简单的方法,例如下一个带有 Sinus 函数的示例:
鼻窦示例
// Adding data (FunctionSeries) to the Chart
chart1.Series.Add(new FunctionSeries(Math.Sin, 0, 30, 0.1, "sin(x)"));
【问题讨论】: