This is the discussion forum for OxyPlot.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
Under review

Is it possible to draw spectrogram with OxyPlot ?

Daniel Daniel 3 years ago • updated by Oystein Bjorke 3 years ago 1
Drawing spectrogram.

Heatmap with non equidistant values

Rainer Worbis 3 years ago • updated by Augustin Šulc 12 months ago 1
Is there a possibility to draw a heatmap where the provided values are not spaced equally but in arbitary distances?


Rotate series labels.

bkboggy 3 years ago 0
Does anyone know how I can rotate labels? I need it in my situation, where a graph may have a large number of columns, to prevent overlapping of labels, which are at the top of each column. Here's my graph:

That's actually a demonstration of best-case scenario, where there's not a whole lot over spilling going on from labels... but if the graph is shrunk, labels begin to be cut-off. I was able to rate the category axis by setting its angle to -90 degrees, but I can't find any way to do the same thing with labels. I've looked through the source code, documentation and examples.
Under review

Areaseries: Fill area below baseline (realtime)

Steve 3 years ago • updated by Oystein Bjorke 2 years ago 3
currently I'm implementing a realtime chart and so far I have the following:

But I want something like this:

Any ideas how to achieve this? Here's the source code:

/// <summary>
/// Setup Plot
/// </summary>
private void SetupPlot()
    this.time = DateTime.Now;

    this.Plot = new PlotModel();

    this.Plot.Axes.Add(new LinearAxis() 
                                      IsZoomEnabled = false, 
                                      Maximum = 102, 
                                      MajorGridlineStyle = LineStyle.Solid, 
                                      MinorGridlineStyle = LineStyle.Dot, 
                                      Position = AxisPosition.Left 

    this.Plot.Axes.Add(new DateTimeAxis()
                                        IsZoomEnabled = false,
                                        Position = AxisPosition.Bottom,

    var areaSeries = new AreaSeries()
        StrokeThickness = 2,
        LineStyle = OxyPlot.LineStyle.Solid,
        Color = OxyColors.Blue,
        Color2 = OxyColors.Transparent,
        Fill = OxyColor.FromRgb(214, 231, 242),
        DataFieldX2 = "X",
        ConstantY2 = 0

    // Fill series with initial values
    for (int i = 0; i < 60; i++)
        areaSeries.Points.Add(new DataPoint(DateTimeAxis.ToDouble(time.Subtract(new TimeSpan(0, 0, 60 - i))), 0));

Update of the Plot (every second):
void timer_Tick(object sender, EventArgs e)
    var areaSeries = (AreaSeries)this.Plot.Series[0];

    if (areaSeries.Points.Count > 60)
    // Update-Plot
    double percentage = GetPercentage();

    areaSeries.Points.Add(new DataPoint(DateTimeAxis.ToDouble(this.time), percentage));
    time = time.AddSeconds(1);
Many Thanks!
Under review

Thread safety and RenderPoints

Nick Donais 3 years ago • updated 3 years ago 4
So I've seen the error a few times, mainly when the plot is trying to update and data is being added to the series:

> System.InvalidOperationException occurred
> HResult=-2146233079
> Message=Collection was modified; enumeration operation may not execute.
> Source=mscorlib
> StackTrace:
> at System.Collections.Generic.List`1.Enumerator.MoveNextRare()

Seems to be because ICollection is being used here:
Would it be better to use one of the concurrent collects for this?

Changing axis scale

Rob Maher 3 years ago 0

I am trying to use OxyPlot to show some data (*shock*).  My question is - how can the axis scale be changed once the data is plotted into it.

For example.  I use the following to create add the data to the graph

public void addDataToGraph()
plotModel1.Title = "Data";
linearAxis1.TickStyle = OxyPlot.Axes.TickStyle.Inside;
linearAxis1.IsPanEnabled = true;
linearAxis1.IsZoomEnabled = true;

linearAxis2.Position = AxisPosition.Bottom;
linearAxis2.TickStyle = OxyPlot.Axes.TickStyle.Inside;
linearAxis2.IsPanEnabled = true;
linearAxis2.IsZoomEnabled = true;


plot1.Model = plotModel1;

and I want something like

public void Rescale()
linearAxis1.Minimum = 100;
linearAxis1.Maximum = 3200;

linearAxis2.Minimum = 200;
linearAxis2.Maximum = 2000;


But this doesn't seem to do anything.  What am I missing here?  Any suggestions?

Thanks for looking. 

Heatmap Series Realtime

Viraj Patel 2 years ago 0

I'm looking to create a heatmap series that adds data points in realtime. Does anyone have a working example using the heatmap series?

Under review

Remove the alpha from 2015.1

Thomas Ibel 3 years ago • updated by Oystein Bjorke 3 years ago 1
I think it is time to move the 2015.1 alpha to an official release.

Barseries with reference line on the bar

rakesh murthy 3 years ago 0
Hello everyone,

I have a cluster Bar series with 2 clusters or may 3 clusters. Now I want one more reference line, like we have on the bullet chart on these clustered bar series. I think its combining the cluster bar series feature and reference line feature of bullet chart.

Please see the picture for the kind of graph I am looking for. Is this possible in oxyplot? if so, please can anybody provide me sample code ?


Set Font/Typeface for axes in Xamarin.Android

MOT 2 years ago 0
Is there any option for setting custom font in Xamarin.Android?
I found out we are able to just set a string for Font. How to set a custom font in Android?