【问题标题】:Set the Y position of the X axis in OxyPlot在 OxyPlot 中设置 X 轴的 Y 位置
【发布时间】:2020-09-14 11:02:44
【问题描述】:

我正在用优秀的 OxyPlot 库绘制一个基本的 LineSeries:

我找不到如何将 X 轴设置为以 0 Y 值为中心而不是在 PlotArea 的底部。

我的代码隐藏如下:

Model = new PlotModel();
LineSeries RightingLever = new LineSeries();
RightingLever.Title = "Righting Lever";
// adding points
Model.Series.Add(RightingLever);
PlotView.Model = Model;

【问题讨论】:

    标签: wpf oxyplot


    【解决方案1】:

    我正在寻找 Axis 类的 PositionAtZeroCrossing 属性。

    foreach (var axis in Model.Axes)
    {
        axis.PositionAtZeroCrossing = true;
        axis.AxislineStyle = LineStyle.Automatic;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-13
      • 1970-01-01
      • 1970-01-01
      • 2022-08-02
      • 1970-01-01
      • 2011-11-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多