Search code examples
c#wpfmvvmoxyplot

How to plot the empirical distribution function in oxyplot?


I have data that are points of the empirical distribution function

ICollection<DataModelXY> data {get; set;}

class DataModelXY
{
  public double X {get; set;}
  public double Y {get; set;}
}

I need do draw function like that First example

or that Second example

Alas, in the oxyplot there is only StairStepSeries which builds the wrong thing Example in oxyplot

Need that without lines under red cross: Need that without lines under red cross


Solution

  • There are two properties on StairStepSeries, VerticalLineStyle and VerticalStrokeThickness.

    Try to set VerticalLineStyle="None" (for some reason None doesn't work for me) and if it won't work you can set VerticalStrokeThickness="0".

    <oxy:Plot>
        <oxy:Plot.Series>
            <oxy:StairStepSeries ItemsSource="{Binding Points}" 
                 VerticalLineStyle="None" VerticalStrokeThickness="0">
            </oxy:StairStepSeries>
        </oxy:Plot.Series>
    </oxy:Plot>