Oxyplot / WinForms ignores axes definition

Oct 17, 2013 at 11:04 PM
Edited Oct 17, 2013 at 11:04 PM
I do have a question about using Oxyplot in WinForms. The following code should add certain axes to the plot but it does not. If I do not specify Minimum/Maximum for both, it does nothing. If I specify both, the x-axis shows the right ones but the y-axis is wrong. Am I doing something wrong?
pm = new PlotModel("Trigonometric functions", "Example using the FunctionSeries")
   {
      PlotType = PlotType.Cartesian,
      Background = OxyColors.White,
    };
pm.Axes.Add(new LinearAxis(AxisPosition.Bottom, 0) { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, Title = "time",Minimum=0, Maximum=15 });
pm.Axes.Add(new LinearAxis(AxisPosition.Left, 1) { MajorGridlineStyle = LineStyle.Solid, MinorGridlineStyle = LineStyle.Dot, Title = "Values", Minimum = 0, Maximum = 10 });

pm.Series.Add(lineSeries1);
plot1.Model = pm;

panel1.Controls.Add(plot1);
Also changing the minimum and maximum values later on does not do anything.
lineSeries1.Points=this.points;
this.pm.Axes[0].Maximum = this.points.Last().X;
this.pm.Axes[0].Minimum = this.points.Last().X-3000;
this.pm.RefreshPlot(true);
Please help.