Search code examples
oxyplot

Axes inside plot


How do I change the position of the Axes so that they are inside the plot?

I have this: enter image description here

I want this: enter image description here

Is this possible?


Solution

  • You can achieve this by using the AxisTickToLabelDistance property on your axis definition, like this:

    plotModel.Axes.Add(new LinearAxis()
    {
        Position = AxisPosition.Bottom,
        AxisTickToLabelDistance = -25,
        TickStyle = TickStyle.Crossing,
    });