Exemplo n.º 1
0
 public void DrawSignalTimePlot(ScottPlot.WpfPlot plot)
 {
     if (plot is null)
     {
         throw new ArgumentNullException(nameof(plot));
     }
     plot.plt.Clear();
     plot.plt.Title(filename.Split('\\').Last(), true);
     plot.plt.XLabel("sample");
     plot.plt.PlotSignalConst(GetSamples());
     plot.Render();
 }
Exemplo n.º 2
0
 public void DrawBandEnergyPlot(ScottPlot.WpfPlot plot)
 {
     if (plot is null)
     {
         throw new ArgumentNullException(nameof(plot));
     }
     if (bandEnergy is null)
     {
         throw new InvalidOperationException($"{nameof (bandEnergy)} must be calculated before being drawn. Call {nameof (RefreshCalculations)} before drawing.");
     }
     plot.plt.Clear();
     plot.plt.Title("Band energy", true);
     plot.plt.XLabel("Frame", enable: true);
     plot.plt.PlotSignalConst(bandEnergy);
     plot.Render();
 }
Exemplo n.º 3
0
 public void DrawSpectralCrestFactorPlot(ScottPlot.WpfPlot plot)
 {
     if (!MainWindow.ShowHiddenParameters)
     {
         return;
     }
     if (plot is null)
     {
         throw new ArgumentNullException(nameof(plot));
     }
     if (spectralCrestFactor is null)
     {
         throw new InvalidOperationException($"{nameof (spectralCrestFactor)} must be calculated before being drawn. Call {nameof (RefreshCalculations)} before drawing.");
     }
     plot.plt.Clear();
     plot.plt.Title("Spectral crest factor", true);
     plot.plt.XLabel("Frame", enable: true);
     plot.plt.PlotSignalConst(spectralCrestFactor);
     plot.Render();
 }
Exemplo n.º 4
0
        private void GenerateChart(List <DataGroup> dataGroups, List <DataGroup> neurons, ScottPlot.WpfPlot wpfPlot)
        {
            dataGroups.ForEach(e => {
                wpfPlot.plt.PlotPoint(e.Position.X, e.Position.Y, System.Drawing.Color.Blue);
                e.SubPoints.ForEach(se => wpfPlot.plt.PlotPoint(se.X, se.Y, System.Drawing.Color.Blue));
            });

            neurons.ForEach(e => {
                wpfPlot.plt.PlotPoint(e.Position.X, e.Position.Y, System.Drawing.Color.Red);
            });
            wpfPlot.Render();
        }