c# - Using OxyPlot in WindowsForms -


so far, i've seen on oxyplot documentation, not out there. how take x-y points , graph them using oxyplot?

here attempt @ taking 2 points , graphing them:

var datamodel = new plotmodel { title = "data plot" };  foreach (var pt in dataprofile) {     xydata.text = string.format("x:{0} y:{1}", pt.x,pt.y);     datamodel.series.add(pt.x, pt.y); //(obviously wrong here)     this.plot1.model = datamodel; } 

what need change/add to: datamodel.series.add(pt.x, pt.y);, adds points? additionally, how can plot points on time? (x-y, plotted time t passes by)

does know of oxyplot tutorial site (for winforms), because cannot find 1 (apart oxyplot documentation, broad @ best).

i know you've mentioned winforms, must able comfortable looking @ of examples , of source code, regardless of ui framework being used. additionally, @ of examples: http://resources.oxyplot.org/examplebrowser/

anyways, want scattierseries plot. add points it. example:

    public static plotmodel examplescatterseriesplot()     {         var plotmodel1 = new plotmodel();         plotmodel1.subtitle = "the scatter points added points collection.";         plotmodel1.title = "scatterseries";         var linearaxis1 = new linearaxis();         linearaxis1.position = axisposition.bottom;         plotmodel1.axes.add(linearaxis1);         var linearaxis2 = new linearaxis();         plotmodel1.axes.add(linearaxis2);         var scatterseries1 = new scatterseries();         scatterseries1.points.add(new scatterpoint(0.667469348137951, 0.701595088793707));         scatterseries1.points.add(new scatterpoint(7.74765135149828, 5.11139268759237));         scatterseries1.points.add(new scatterpoint(7.97490558492714, 8.27308291023275));         scatterseries1.points.add(new scatterpoint(1.65958795308116, 7.36130623489679));         scatterseries1.points.add(new scatterpoint(2.6021636475819, 5.06004851081411));         scatterseries1.points.add(new scatterpoint(2.30273722312541, 3.87140443263175));         scatterseries1.points.add(new scatterpoint(2.15980615101746, 0.208108848989061));         scatterseries1.actualpoints.add(new scatterpoint(0.667469348137951, 0.701595088793707));         scatterseries1.actualpoints.add(new scatterpoint(7.74765135149828, 5.11139268759237));         scatterseries1.actualpoints.add(new scatterpoint(7.97490558492714, 8.27308291023275));         scatterseries1.actualpoints.add(new scatterpoint(1.65958795308116, 7.36130623489679));         scatterseries1.actualpoints.add(new scatterpoint(2.6021636475819, 5.06004851081411));         scatterseries1.actualpoints.add(new scatterpoint(2.30273722312541, 3.87140443263175));         scatterseries1.actualpoints.add(new scatterpoint(2.15980615101746, 0.208108848989061));         plotmodel1.series.add(scatterseries1);         return plotmodel1;     } 

there ton of examples under example browser link gave you. above code snipped there. so, research of available options. oxyplot flexible , i've been able extend on in recent project.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -