【问题标题】:OxyPlot does not display numbers on axis winforms [howto solve bug]OxyPlot 不在轴 winforms 上显示数字 [如何解决错误]
【发布时间】:2015-03-24 14:20:41
【问题描述】:

已解决删除 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);

【问题讨论】:

  • 我发现问题出在哪里。我只需要删除轴 LinearAxis 的属性

标签: oxyplot


【解决方案1】:

LinearAxis 删除此属性/并尝试删除其他属性。

【讨论】:

    猜你喜欢
    • 2016-01-15
    • 1970-01-01
    • 2023-01-18
    • 1970-01-01
    • 1970-01-01
    • 2022-01-24
    • 2013-09-27
    • 2020-03-16
    • 1970-01-01
    相关资源
    最近更新 更多