2017-02-21 4 views
1

ich mit OxyPlot C# WPF-Anwendung bin mitentfernen oberen und rechten Balken koordinieren OxyPlot

The coordinate system looks like this so far

I would like to remove the upper and the right coordinate labels.

Der Code sieht wie folgt aus:

<Window x:Class="TestOxyPlot.MainWindow" 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
     xmlns:oxy="http://oxyplot.org/wpf" 
     xmlns:local="clr-namespace:TestOxyPlot" 
     mc:Ignorable="d" 
     Title="MainWindow" Height="350" Width="525"> 
    <Grid> 
     <oxy:Plot x:Name="oxyPlot" Title="{Binding Title}" Margin="207,53,0,0"> 
      <oxy:Plot.Axes> 
       <oxy:LinearAxis Position="Bottom" MinimumPadding="0.1" MaximumPadding="0.1"/> 
       <oxy:LinearAxis Position="Right" MinimumPadding="0.1" MaximumPadding="0.1"/> 
       <oxy:LinearAxis Position="Left" MinimumPadding="0.1" MaximumPadding="0.1" AxislineStyle="None"/> 
       <oxy:LinearAxis Position="Top" MinimumPadding="0.1" MaximumPadding="0.1" AxislineStyle="None"/> 
      </oxy:Plot.Axes> 

      <oxy:Plot.Series> 
       <oxy:LineSeries x:Name="ls" ItemsSource="{Binding Points}" LineStyle="None" MarkerType="Square" MarkerSize="5" MarkerFill="Black"/> 
      </oxy:Plot.Series> 

     </oxy:Plot> 
     <TextBox x:Name="textBox" HorizontalAlignment="Left" Height="23" Margin="44,64,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" MouseLeave="textBox_MouseLeave" TextChanged="textBox_TextChanged"/> 
     <TextBox x:Name="textBox1" HorizontalAlignment="Left" Height="23" Margin="44,101,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" TextChanged="textBox1_TextChanged"/> 
     <Button x:Name="button" Content="Button" HorizontalAlignment="Left" Margin="68,174,0,0" VerticalAlignment="Top" Width="75" Click="button_Click"/> 
    </Grid> 
</Window> 

Ich dachte

AxislineStyle = „None“

So

helfen würde, ich hoffe, hr kann mir sagen, wie ich die obere und die rechte Markierung der Achsen entfernen kann.

Vielen Dank im Voraus.

+0

Haben Sie versucht, das Entfernen ' Jose

+0

Nein danke. Aber das war die Lösung. Ich wollte eine Grenze verwenden und dachte, das wäre notwendig. – GabelUndMesser

Antwort

1

Sie sollten TextColor = "Transparent" in Ihrem LinearAxis setzen. Darüber hinaus gibt es andere Eigenschaften das Erscheinungsbild anzupassen:

MinorTickSize="0" TickStyle="Crossing" 
+0

@GabelUndMesser Bitte lassen Sie mich wissen, wenn es Ihr Problem nicht gelöst hat. – Ron

Verwandte Themen