2

I create a new Plot and its PlotModel with a black BackgroundColor Then I create a new Axes. The X-Axis doesn't matter, it's invisible. The Y-Axis is:

var valueAxisY = new OxyPlot.Axes.LinearAxis(AxisPosition.Left, minValue, maxValue)
{
   AxislineThickness = 2,
   AxislineColor = OxyColors.White,
   MinorGridLinethickness = 2,
   MajorGridLineThickness = 2,
   MinorTickSize = 4,
   MajorTickSize = 7,
   TicklineColor = OxyColors.White,
   FontSize = 40,
   TextColor = OxyColors.White
}

Everything works BUT the Y-Axisline. It seems to stay black no matter what. The ticks starting 1-2 pixels on the left of where the line should be are white and have the correct length.

Is this the wrong parameter?

4

2 回答 2

0

诀窍是Undefined

var valueAxisY = new OxyPlot.Axes.LinearAxis(AxisPosition.Left, minValue, maxValue)
{
   LineStyle = LineStyle.Undefined
};

不知何故,这是一条可见的、可编辑的、连续的线。

于 2014-10-27T08:23:06.343 回答
0

如果您定义了轴线,您还应该隐藏绘图区域的边框,因为它是在轴线上绘制的。

using model.PlotAreaBorderThickness = 0
于 2015-07-24T12:50:59.663 回答