Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oxyplot division color change

Tags:

oxyplot

Does anyone know how to change the color of the division markers on an oxyplot? I can't seem to find that specific property anywhere. Here is the code I am using to produce the plot below. As you can see the division markers are black. Would really like to change their color. Thanks.

 <oxy:Plot PlotAreaBorderColor="White"  Background="#242426" TextColor="White" Margin="5" Title="X and Y FPOS" TitleFontSize="12" Grid.Row="0" Grid.ColumnSpan="2">
        <oxy:LineSeries ItemsSource="{Binding XYData}"/>
    </oxy:Plot>

enter image description here

like image 836
mrsargent Avatar asked Aug 13 '26 08:08

mrsargent


2 Answers

The property you are looking for is TicklineColor. You have to do it in both axes:

Effect:

Effect acquired

Code:

<oxy:Plot>
...
    <oxy:Plot.Axes>
        <oxy:LinearAxis Position="Left" TicklineColor="White" />
        <oxy:LinearAxis Position="Bottom" TicklineColor="White" />    
    <oxy:Plot.Axes>
</oxy:Plot>
like image 141
Jose Avatar answered Aug 15 '26 09:08

Jose


I think, in this moment it is impossible to set color of markers. But, perhaps, you will approach the option of using PlotAreaBackground.

Example:

.xaml:

<oxy:Plot PlotAreaBorderColor="Green"  Background="DarkGreen" 
          PlotAreaBackground="#242426" TextColor="White" 
          Title="X and Y FPOS" TitleFontSize="12" 
          Grid.Row="0" Grid.ColumnSpan="2">
    <oxy:LineSeries ItemsSource="{Binding XYData}" Color="Yellow"/>
</oxy:Plot>

.fs:

type MainViewModel() = 
    inherit ViewModelBase()  

    let data = [0.0..0.1..50.0] |> List.mapi(fun i x -> DataPoint(float i, cos x))
    member self.XYData with get() = data

Screenshot:

PlotAreaBackground

like image 34
FoggyFinder Avatar answered Aug 15 '26 08:08

FoggyFinder