wpf - Error in references -
i not sure why there error in references. oxyplot.wpf.lineseries
oxyplot.series.series
best overloaded method match system.collections.objectmodel.collection.add(oxyplot.axes.axis)
has invalid arguments.
using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using oxyplot; using oxyplot.wpf; using oxyplot.axes; namespace points { public class psdtest { public static plotmodel filteringinvalidpoints() { var plotmodel1 = new plotmodel(); plotmodel1.title = "filtering invalid points"; var linearaxis1 = new linearaxis(); linearaxis1.position = axisposition.bottom; linearaxis1.title = "x-axis"; plotmodel1.axes.add(linearaxis1); var linearaxis2 = new linearaxis(); linearaxis2.title = "y-axis"; plotmodel1.axes.add(linearaxis2); var lineseries1 = new lineseries(); lineseries1.title = "nan"; lineseries1.points.add(new datapoint(double.nan, double.nan)); lineseries1.points.add(new datapoint(1, 0)); lineseries1.points.add(new datapoint(2, 10)); lineseries1.points.add(new datapoint(double.nan, 20)); lineseries1.points.add(new datapoint(3, 10)); lineseries1.points.add(new datapoint(4, 0)); lineseries1.points.add(new datapoint(4.5, double.nan)); lineseries1.points.add(new datapoint(5, 0)); lineseries1.points.add(new datapoint(6, 10)); lineseries1.points.add(new datapoint(double.nan, double.nan)); lineseries1.points.add(new datapoint(7, 0)); lineseries1.points.add(new datapoint(double.nan, double.nan)); plotmodel1.series.add(lineseries1); var lineseries2 = new lineseries(); lineseries2.title = "positiveinfinity"; lineseries2.points.add(new datapoint(double.positiveinfinity, double.positiveinfinity)); lineseries2.points.add(new datapoint(1, 1)); lineseries2.points.add(new datapoint(2, 11)); lineseries2.points.add(new datapoint(double.positiveinfinity, 20)); lineseries2.points.add(new datapoint(3, 11)); lineseries2.points.add(new datapoint(4, 1)); lineseries2.points.add(new datapoint(4.5, double.positiveinfinity)); lineseries2.points.add(new datapoint(5, 1)); lineseries2.points.add(new datapoint(6, 11)); lineseries2.points.add(new datapoint(double.positiveinfinity, double.positiveinfinity)); lineseries2.points.add(new datapoint(7, 1)); lineseries2.points.add(new datapoint(double.positiveinfinity, double.positiveinfinity)); plotmodel1.series.add(lineseries2); var lineseries3 = new lineseries(); lineseries3.title = "negativeinfinity"; lineseries3.points.add(new datapoint(double.negativeinfinity, double.negativeinfinity)); lineseries3.points.add(new datapoint(1, 2)); lineseries3.points.add(new datapoint(2, 12)); lineseries3.points.add(new datapoint(double.negativeinfinity, 20)); lineseries3.points.add(new datapoint(3, 12)); lineseries3.points.add(new datapoint(4, 2)); lineseries3.points.add(new datapoint(4.5, double.negativeinfinity)); lineseries3.points.add(new datapoint(5, 2)); lineseries3.points.add(new datapoint(6, 12)); lineseries3.points.add(new datapoint(double.negativeinfinity, double.negativeinfinity)); lineseries3.points.add(new datapoint(7, 2)); lineseries3.points.add(new datapoint(double.negativeinfinity, double.negativeinfinity)); plotmodel1.series.add(lineseries3); return plotmodel1; } } }
it sounds you're running issues different namespaces. can't entirely understand you're attempting, may not give desired result, able code compile using following namespaces (having installed oxyplot.wpf via nuget):
using oxyplot; using oxyplot.axes; using oxyplot.series;
it may case doesn't you, if turns out you're after specific behaviour found in oxyplot.wpf
namespace.
Comments
Post a Comment