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

Is it possible to draw spectrogram with OxyPlot ?

Daniel Daniel 5 lat temu Ostatnio zmodyfikowane przez Oystein Bjorke 5 lat temu 1
Drawing spectrogram.
W trakcie analizy

Thread safety and RenderPoints

Nick Donais 6 lat temu Ostatnio zmodyfikowane przez Joshua 1 rok temu 6
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?

Heatmap with non equidistant values

Rainer Worbis 5 lat temu Ostatnio zmodyfikowane przez Augustin Šulc 3 lat temu 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 5 lat temu 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.
W trakcie analizy

Areaseries: Fill area below baseline (realtime)

Steve 5 lat temu Ostatnio zmodyfikowane przez Oystein Bjorke 5 lat temu 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!

Changing axis scale

Rob Maher 5 lat temu 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. 

how to invisibility one plotview

future0723 2 lat temu 0

hi, everybody.

Relation to the  Example:"Gridline cropping" ,the plotview was split to four parts,how can I invisibility one of the four?



Heatmap Series Realtime

Viraj Patel 4 lat temu 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?

W trakcie analizy

Remove the alpha from 2015.1

Thomas Ibel 5 lat temu Ostatnio zmodyfikowane przez Oystein Bjorke 5 lat temu 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 5 lat temu 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 ?