Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all articles
Browse latest Browse all 2061

New Comment on "WpfExample1"

$
0
0
Some of the error messages disappeared after fully qualifying to use OxyPlot.Series.LineSeries (instead of OxyPlot.Wpf.LineSeries) If we have to use OxyPlot.* objects over OxyPlot.Wpf.* (LineSeries, LinearAxes, AxesPosition) then how are we using oxyplot WPF classes for WPF application? Can't find 'Points' method on OxyPlot.Wpf.LineSeries object. OxyPlot.PlotModel temp = new PlotModel("Square wave"); OxyPlot.Series.LineSeries ls = new OxyPlot.Series.LineSeries("sin(x)+sin(3x)/3+sin(5x)/5+..."); int n = 10; for (double x = -10; x < 10; x += 0.0001) { double y = 0; for (int i = 0; i < n; i++) { int j = i * 2 + 1; y += Math.Sin(j * x) / j; } ls.Points.Add(new DataPoint(x, y)); } temp.Series.Add(ls); temp.Axes.Add(new OxyPlot.Axes.LinearAxis(OxyPlot.Axes.AxisPosition.Left, -4, 4)); temp.Axes.Add(new OxyPlot.Axes.LinearAxis(OxyPlot.Axes.AxisPosition.Bottom)); MyPlotModel = temp; // this is raising the INotifyPropertyChanged event Also, get the error: The name 'MyPlotModel' does not exist in the current context Thanks, -srinivas y.

Viewing all articles
Browse latest Browse all 2061

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>