已解决删除 LinearAxis 等的属性
嗨,它是标准示例。在 oxyplot 浏览器中显示的数字很好/但我在这个示例 oxyplot 版本 2014.1.319.1 中看不到它们
public OxyPlot.WindowsForms.PlotView MyPlot;
public Form1()
{
InitializeComponent();
this.MyPlot = new OxyPlot.WindowsForms.PlotView();
this.SuspendLayout();
this.MyPlot.Dock = System.Windows.Forms.DockStyle.Fill;
this.MyPlot.Location = new System.Drawing.Point(0, 0);
this.MyPlot.Margin = new System.Windows.Forms.Padding(0);
this.MyPlot.Name = "MyPlot";
this.MyPlot.Size = new System.Drawing.Size(632, 446);
this.MyPlot.TabIndex = 0;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(632, 446);
this.Controls.Add(this.MyPlot);
this.Name = "Form1";
this.Text = "OxyPlot in Windows Forms";
this.ResumeLayout(false);
var pm = new PlotModel
{
Title = "Trigonometric functions",
Subtitle = "Example using the FunctionSeries",
PlotType = PlotType.Cartesian,
Background = OxyColors.White
};
MyPlot.Model = pm;
MyPlot.Model.PlotType = PlotType.XY;
MyPlot.Model.Background = OxyColor.FromArgb(0, 200, 200, 200);
MyPlot.Model.TextColor = OxyColor.FromArgb(0, 50, 50, 50);
var serie1 = new LineSeries { Title = "Csharp ploting with oxyplot serie 1", StrokeThickness = 2 };
serie1.Points.Add(new DataPoint(1, 4));
serie1.Points.Add(new DataPoint(2, 5));
MyPlot.Model.Series.Add(serie1);
LinearAxis botax = new LinearAxis(AxisPosition.Bottom);
MyPlot.Model.Axes.Add(botax);