is possible draw area of integral in oxyplot?
with mathnet.numerics
library possible calculate these integrals wondering if able draw in plot?
i no expert in matter, may have found helpfull you... take @ areaseries
. think need.
example:
var model = new plotmodel { title = "areaseries" }; var series = new areaseries { title = "integral" }; (double x = -10; x <= 10; x++) { series.points.add(new datapoint(x, (-1 * (x * x) + 50))); } model.series.add(series);
then set model plotview.model
, should see plot similar @ posted in comments above.
i hope works you.
----- edit (because of comment in answer) -----
it turns out can asked in comments. need fill areaseries.points2
points want restrict area. example, in previous sample add inside for
following line
series.points2.add(new datapoint(x, x));
then have area defined 2 lines: y = -x^2 + 50
, y = x
. can set second line transparent.
complete example:
var model = new plotmodel { title = "areaseries" }; var series = new areaseries { title = "series" }; (double x = -10; x <= 10; x++) { series.points.add(new datapoint(x, (-1 * (x * x) + 50))); series.points2.add(new datapoint(x, x)); } series.color2 = oxycolors.transparent; model.series.add(series); plotview.model = model;
now have add formulas need, , should show similar graph 1 put in comment.
Comments
Post a Comment