Need general tutorial!!

Sep 5, 2012 at 9:02 PM

Hi all!

 

I am using C# in msVS2010 with the WinForms version of oxyplot.  I am just trying to understand how to generate a plot so i can finish writing my program but i am currently stuck.  Basically i took the code from an example and call it when i double click the oxyplot control in my form, intending to update the control that i am clicking "plot1".  The code is below:

var plotModel1 = new OxyPlot.PlotModel();

plotModel1.Title = "Outside";           

var linearAxis1 = new OxyPlot.LinearAxis();           

plotModel1.Axes.Add(linearAxis1);           

var linearAxis2 = new OxyPlot.LinearAxis();           

linearAxis2.Position = OxyPlot.AxisPosition.Bottom;           

plotModel1.Axes.Add(linearAxis2);

So here is where i am stuck.  How do i get the plot, "plot1" to update with the information in "plotModel1"?

 

Thanks!

Coordinator
Sep 5, 2012 at 9:13 PM

try to set the Model property of the Plot control:

plot1.Model = plotModel1;

Sep 5, 2012 at 9:23 PM

Yep that was all i needed!  When i get a better handle on this i'll be sure to publish some tutorials to help people out!

Thanks for the great library and the super-fast response!