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;
```
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;
```