hattenn
hattenn

Reputation: 4399

How to remove axis dashes in OxyPlot

I am using OxyPlot and trying to show only the plot. I have found a way to make the axis numbers, the axes, and the background transparent. But I can't seem to find a way to make the axes dashes transparent:

Axis dashes.

Here's the code that I use:

<oxy:Plot Grid.Row="1" Background="Transparent" TextColor="Transparent" PlotAreaBorderColor="Transparent">
    <oxy:LineSeries ItemsSource="{Binding CoilData, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" DataFieldX="Key" DataFieldY="Value"/>
</oxy:Plot>

Is there any way to achieve that?

Upvotes: 1

Views: 2419

Answers (3)

Nicolas Blanco
Nicolas Blanco

Reputation: 21

Use this properties of Linear Axis :

LinearAxis eje_y=new LinearAxis();
eje_y.MinorTickSize = 0;
eje_y.MajorTickSize = 0;

Upvotes: 1

Ioan
Ioan

Reputation: 2412

If you don't want the axes to be visible, set their IsAxisVisible property to false. You still need to add them so that the default axis/value is overwritten.

Upvotes: 0

hattenn
hattenn

Reputation: 4399

I have solved it by using the following:

<oxy:Plot.Axes>
    <oxy:LinearAxis Position="Left" TickStyle="None"/>
    <oxy:LinearAxis Position="Bottom" TickStyle="None"/>
</oxy:Plot.Axes>

Upvotes: 4

Related Questions