thanks for the notice! I will investigate this. We should also address this related issue: https://oxyplot.codeplex.com/workitem/10167
↧
New Post: NuGet status for OxyPlot.Metro package?
↧
Source code checked in, #862f45afa3c1
PlotModel: make the Render method virtual (discussions/542280)
↧
↧
Source code checked in, #140f3264e2ea
Correct output paths for Xamarin projects
↧
Source code checked in, #7279a7a86d2e
Minor updates to Xamarin samples
↧
New Post: XKCD-style graphs
I think there is a better way... I made the
Render method of the PlotModel virtual. Now you can make an XKCD IRenderContext decorator and use this in the overridden render method. This means all content of the plot model can be XKCD style! :-) If someone can write the rand_func (see link) in c#, I can make the decorator! :) http://nbviewer.ipython.org/gist/anonymous/3835181↧
↧
New Post: override of getHashCode in PlotElement
PlotElement.GetHashCode is used by the HeatMapSeries to check whether the ColorAxis has changed. Since this is a reference type I guess you have a point, we can change the implementation of
HeatMapSeries and revert to the default GetHashCode in PlotElement.↧
New Post: XKCD-style graphs
Sounds good! I'll see if I can help tonight.
↧
Source code checked in, #eddfeaba1c21
PlotElement: revert to default GetHashCode (discussions/542265)
↧
New Post: override of getHashCode in PlotElement
change committed
↧
↧
Commented Issue: Performance of Bar/ColumnSeries [9974]
check performance - see http://oxyplot.codeplex.com/discussions/371296
Comments: Added example histogram with 2000 bar/column items
Comments: Added example histogram with 2000 bar/column items
↧
Closed Issue: Performance of Bar/ColumnSeries [9974]
check performance - see http://oxyplot.codeplex.com/discussions/371296
↧
Commented Unassigned: Memory Leak in LineSeries [10151]
As described in this discussion:
https://oxyplot.codeplex.com/discussions/532576#post1215810
When LineSeries is bound to rapidly changing data, it can be observed that stale data which is no longer displayed is not being properly garbage collected. This leak is independent of the storage class that is used in the view model layer; the one test case that avoided the memory leak was by binding the line series to an observable collection, and clearing the observable collection prior to each update, however this process is expected to be extremely inefficient.
The attached project is equivalent to the usage within my application, and exhibits the leak. Eventually, the application should throw an OutOfMemoryException (typically within a few hours), although the leak can be observed rather quickly from a memory profiler.
Comments: @Scribbles: thanks for the example! I also have a hard time reading VB, so I need help on this one. Can someone create a c# example that reproduces this behaviour? Is it a bug in the OxyPlot library or in the example application? I am very concerned about memory leaks, can we create a unit test that verifies that it is not leaking?
https://oxyplot.codeplex.com/discussions/532576#post1215810
When LineSeries is bound to rapidly changing data, it can be observed that stale data which is no longer displayed is not being properly garbage collected. This leak is independent of the storage class that is used in the view model layer; the one test case that avoided the memory leak was by binding the line series to an observable collection, and clearing the observable collection prior to each update, however this process is expected to be extremely inefficient.
The attached project is equivalent to the usage within my application, and exhibits the leak. Eventually, the application should throw an OutOfMemoryException (typically within a few hours), although the leak can be observed rather quickly from a memory profiler.
Comments: @Scribbles: thanks for the example! I also have a hard time reading VB, so I need help on this one. Can someone create a c# example that reproduces this behaviour? Is it a bug in the OxyPlot library or in the example application? I am very concerned about memory leaks, can we create a unit test that verifies that it is not leaking?
↧
Source code checked in, #ac66f74f997a
#10148 added example
↧
↧
Commented Unassigned: Data points remain visible outside of bounds on panning [10148]
When creating a graph with undefined points, the regular data points are not hidden when panning if they are enclosed by two undefined points, like so:
```
line.Points.Add(DataPoint.Undefined);
line.Points.Add(
new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
```
A possible workaround is the duplication of the same defined point in which case all works are expected:
```
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
```
Complete example follows:
```
OxyPlot.Wpf.Plot plot = new OxyPlot.Wpf.Plot();
plot.Model = new PlotModel();
plot.Model.Axes.Clear();
DateTimeAxis masterAxis = new DateTimeAxis() { Key = "MasterDateTimeAxis", Position = AxisPosition.Bottom };
plot.Model.Axes.Add(masterAxis);
LineSeries line = new LineSeries() { Title = "Measurement" };
line.XAxisKey = masterAxis.Key;
LinearAxis yAxis = new LinearAxis(AxisPosition.Left, line.Title) { Key = line.Title };
yAxis.AbsoluteMinimum = yAxis.Minimum = -100;
yAxis.AbsoluteMaximum = yAxis.Maximum = 100;
yAxis.Key = line.Title;
line.YAxisKey = yAxis.Key;
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(1)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(2)), 45));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(3)), 17));
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(5)), 45));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(6)), 17));
yAxis.IsZoomEnabled = false;
yAxis.IsPanEnabled = false;
plot.Model.Series.Add(line);
plot.Model.Axes.Add(yAxis);
content.Content = plot;
```
Comments: Thanks for the code, I have added this under ExampleLibrary/OpenIssues But I don't understand the problem here. The single point should be visible, and I don't see anything changing when panning.
```
line.Points.Add(DataPoint.Undefined);
line.Points.Add(
new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
```
A possible workaround is the duplication of the same defined point in which case all works are expected:
```
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
```
Complete example follows:
```
OxyPlot.Wpf.Plot plot = new OxyPlot.Wpf.Plot();
plot.Model = new PlotModel();
plot.Model.Axes.Clear();
DateTimeAxis masterAxis = new DateTimeAxis() { Key = "MasterDateTimeAxis", Position = AxisPosition.Bottom };
plot.Model.Axes.Add(masterAxis);
LineSeries line = new LineSeries() { Title = "Measurement" };
line.XAxisKey = masterAxis.Key;
LinearAxis yAxis = new LinearAxis(AxisPosition.Left, line.Title) { Key = line.Title };
yAxis.AbsoluteMinimum = yAxis.Minimum = -100;
yAxis.AbsoluteMaximum = yAxis.Maximum = 100;
yAxis.Key = line.Title;
line.YAxisKey = yAxis.Key;
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(1)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(2)), 45));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(3)), 17));
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(5)), 45));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(6)), 17));
yAxis.IsZoomEnabled = false;
yAxis.IsPanEnabled = false;
plot.Model.Series.Add(line);
plot.Model.Axes.Add(yAxis);
content.Content = plot;
```
Comments: Thanks for the code, I have added this under ExampleLibrary/OpenIssues But I don't understand the problem here. The single point should be visible, and I don't see anything changing when panning.
↧
Commented Unassigned: plotting lineSeries behaving strangely.. [10178]
please ignore the first comment below.. I added it to the bottom of the issue..
I am plotting an FFT with about 480,000. points. I am using a line series.
If I plot the magnitude of the fft it plots very quickly with no problems.
if instead, before I define the lineSeries I for loop through the data series and change each data point to dB using 20*Math.log10(y/refVal). The plot freezes the UI and never updates and never plots. same number of points just different Y values.
The only thing I can think of to explain this is perhaps the dB version of the data is more chaotic meaning it jumps around a lot more. where the linear data is much more predictable.
I'm not sure what the line generation algorithm is but I could imagine something like this bogging down some sort of interpolator or curve fitting. but It was my understanding that lineSeries did not do any of this.
any thoughts?! thank you
windows 8
new bottom of the line laptop
windows forms C# app.
The code I am using to plot is shown below....
```
var plotModel2 = new PlotModel();
plotModel2.Title = "LineSeries, 100k points";
var linearAxis3 = new LinearAxis();
linearAxis1.Position = AxisPosition.Bottom;
plotModel1.Axes.Add(linearAxis1);
var linearAxis4 = new LinearAxis();
plotModel1.Axes.Add(linearAxis2);
var lineSeries2 = new LineSeries();
// I have an array of complex values called cdata representing the complex fft points (y axis) with 480,000 elements.
int myloopcount =0;
while (myloopcount < datalength)
{
double tempe;
tempe = Math.Abs(cdata[myloopcount].Magnitude*TheWaves.conversionFactor);
tempe = (.707*(tempe*2/datalength));
// if I comment out the line below containing log10 it plots quickly.. with it uncommented it hangs the UI an never comes back. sometimes Visual studio pops something up about wating for a thread but Im not sure what that means.
tempe = Math.Abs(20*Math.Log10(tempe/1e-6));
double myYF = tempe;
lineSeries2.Points.Add(new DataPoint(myloopcount/T, myYF));
myloopcount++;
}// end while loop
plotModel2.Series.Add(lineSeries2);
this.plot2.Model = plotModel2;
```
Comments: Can we close this?
I am plotting an FFT with about 480,000. points. I am using a line series.
If I plot the magnitude of the fft it plots very quickly with no problems.
if instead, before I define the lineSeries I for loop through the data series and change each data point to dB using 20*Math.log10(y/refVal). The plot freezes the UI and never updates and never plots. same number of points just different Y values.
The only thing I can think of to explain this is perhaps the dB version of the data is more chaotic meaning it jumps around a lot more. where the linear data is much more predictable.
I'm not sure what the line generation algorithm is but I could imagine something like this bogging down some sort of interpolator or curve fitting. but It was my understanding that lineSeries did not do any of this.
any thoughts?! thank you
windows 8
new bottom of the line laptop
windows forms C# app.
The code I am using to plot is shown below....
```
var plotModel2 = new PlotModel();
plotModel2.Title = "LineSeries, 100k points";
var linearAxis3 = new LinearAxis();
linearAxis1.Position = AxisPosition.Bottom;
plotModel1.Axes.Add(linearAxis1);
var linearAxis4 = new LinearAxis();
plotModel1.Axes.Add(linearAxis2);
var lineSeries2 = new LineSeries();
// I have an array of complex values called cdata representing the complex fft points (y axis) with 480,000 elements.
int myloopcount =0;
while (myloopcount < datalength)
{
double tempe;
tempe = Math.Abs(cdata[myloopcount].Magnitude*TheWaves.conversionFactor);
tempe = (.707*(tempe*2/datalength));
// if I comment out the line below containing log10 it plots quickly.. with it uncommented it hangs the UI an never comes back. sometimes Visual studio pops something up about wating for a thread but Im not sure what that means.
tempe = Math.Abs(20*Math.Log10(tempe/1e-6));
double myYF = tempe;
lineSeries2.Points.Add(new DataPoint(myloopcount/T, myYF));
myloopcount++;
}// end while loop
plotModel2.Series.Add(lineSeries2);
this.plot2.Model = plotModel2;
```
Comments: Can we close this?
↧
Commented Unassigned: Data points remain visible outside of bounds on panning [10148]
When creating a graph with undefined points, the regular data points are not hidden when panning if they are enclosed by two undefined points, like so:
```
line.Points.Add(DataPoint.Undefined);
line.Points.Add(
new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
```
A possible workaround is the duplication of the same defined point in which case all works are expected:
```
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
```
Complete example follows:
```
OxyPlot.Wpf.Plot plot = new OxyPlot.Wpf.Plot();
plot.Model = new PlotModel();
plot.Model.Axes.Clear();
DateTimeAxis masterAxis = new DateTimeAxis() { Key = "MasterDateTimeAxis", Position = AxisPosition.Bottom };
plot.Model.Axes.Add(masterAxis);
LineSeries line = new LineSeries() { Title = "Measurement" };
line.XAxisKey = masterAxis.Key;
LinearAxis yAxis = new LinearAxis(AxisPosition.Left, line.Title) { Key = line.Title };
yAxis.AbsoluteMinimum = yAxis.Minimum = -100;
yAxis.AbsoluteMaximum = yAxis.Maximum = 100;
yAxis.Key = line.Title;
line.YAxisKey = yAxis.Key;
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(1)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(2)), 45));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(3)), 17));
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(5)), 45));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(6)), 17));
yAxis.IsZoomEnabled = false;
yAxis.IsPanEnabled = false;
plot.Model.Series.Add(line);
plot.Model.Axes.Add(yAxis);
content.Content = plot;
```
Comments: At the time of the posting the single points would remain visible outside the bounds of the plot when dragging unless they are added in pairs. I haven't tried testing it in a while - this may have been resolved already through some other fix.
```
line.Points.Add(DataPoint.Undefined);
line.Points.Add(
new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
```
A possible workaround is the duplication of the same defined point in which case all works are expected:
```
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
```
Complete example follows:
```
OxyPlot.Wpf.Plot plot = new OxyPlot.Wpf.Plot();
plot.Model = new PlotModel();
plot.Model.Axes.Clear();
DateTimeAxis masterAxis = new DateTimeAxis() { Key = "MasterDateTimeAxis", Position = AxisPosition.Bottom };
plot.Model.Axes.Add(masterAxis);
LineSeries line = new LineSeries() { Title = "Measurement" };
line.XAxisKey = masterAxis.Key;
LinearAxis yAxis = new LinearAxis(AxisPosition.Left, line.Title) { Key = line.Title };
yAxis.AbsoluteMinimum = yAxis.Minimum = -100;
yAxis.AbsoluteMaximum = yAxis.Maximum = 100;
yAxis.Key = line.Title;
line.YAxisKey = yAxis.Key;
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(1)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(2)), 45));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(3)), 17));
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(4)), 10));
line.Points.Add(DataPoint.Undefined);
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(5)), 45));
line.Points.Add(new DataPoint(DateTimeAxis.ToDouble(DateTime.Now.AddSeconds(6)), 17));
yAxis.IsZoomEnabled = false;
yAxis.IsPanEnabled = false;
plot.Model.Series.Add(line);
plot.Model.Axes.Add(yAxis);
content.Content = plot;
```
Comments: At the time of the posting the single points would remain visible outside the bounds of the plot when dragging unless they are added in pairs. I haven't tried testing it in a while - this may have been resolved already through some other fix.
↧
New Post: Where to start in the code?
Hi there,
I was looking to email objo, but I guess others might also be interested, so I am start a "discussion" about it.
I think Oxyplot is great and I'd love to contribute to it in the longer term. I downloaded the source code a few days back and started looking through it, but have a hard time finding a place to start reading code. I'm used to starting projects from scratch, or having a more "guided" type of development.
Could you please suggest good places to start in the code to get a general understanding of how OxyPlot works?
I was looking to email objo, but I guess others might also be interested, so I am start a "discussion" about it.
I think Oxyplot is great and I'd love to contribute to it in the longer term. I downloaded the source code a few days back and started looking through it, but have a hard time finding a place to start reading code. I'm used to starting projects from scratch, or having a more "guided" type of development.
Could you please suggest good places to start in the code to get a general understanding of how OxyPlot works?
↧
↧
Source code checked in, #ffa563488402
Metro: fix build issues (discussions/542345)
↧
Source code checked in, #5f40e92d00b5
Metro: fix build issues (discussions/542345)
↧
New Post: NuGet status for OxyPlot.Metro package?
I just checked OxyPlot.Metro on NuGet, http://www.nuget.org/packages/OxyPlot.Metro/, and I see that a new version is now released in sync with the latest Core library! Great job, Oystein, many many thanks for taking care of this issue so quickly.
I will upgrade to the latest version as soon as possible and give it some serious testing :-)
Best regards,
Anders @ Cureos
I will upgrade to the latest version as soon as possible and give it some serious testing :-)
Best regards,
Anders @ Cureos
↧