Table of Contents

Class Plotter

Namespace
Loehnert.Waveforms
Assembly
Loehnert.Waveforms.dll

This class contains static methods, to plot IWaveform implementations.

public static class Plotter
Inheritance
Plotter
Inherited Members

Methods

Plot(IWaveform, string)

Plots a waveform in a new window.

public static PlotWindowViewModel Plot(IWaveform waveform, string title = null)

Parameters

waveform IWaveform

Waveform to plot.

title string

The optional title describing the plot.

Returns

PlotWindowViewModel

The window view model.

Exceptions

ArgumentNullException

Thrown if waveform is null.

Plot(IEnumerable<IWaveform>, bool, string)

Plots waveforms in a new window.

public static PlotWindowViewModel Plot(IEnumerable<IWaveform> waveforms, bool waveformsAreTimeBased = true, string title = null)

Parameters

waveforms IEnumerable<IWaveform>

Waveforms to plot.

waveformsAreTimeBased bool

If true the waveforms use the same x-axis but multiple y-axes.

title string

The optional title describing the plot.

Returns

PlotWindowViewModel

The window view model.

Exceptions

ArgumentNullException

Thrown if waveforms is null.

PlotToCsv(IWaveform, string)

Plots a waveform in a CSV file.

public static void PlotToCsv(IWaveform waveform, string path = null)

Parameters

waveform IWaveform

Waveforms to plot.

path string

Target path for file or folder. The file is named by the given path or if its an folder by the key or random if key is null, empty or whitespace.

PlotToCsv(IEnumerable<IWaveform>, string)

Plots multiple waveforms in a CSV file.

public static void PlotToCsv(IEnumerable<IWaveform> waveforms, string path = null)

Parameters

waveforms IEnumerable<IWaveform>

Waveforms which will be plot to the path.

path string

Target path, can be file name or a folder name. The file is named according to the specified path or, if it is a folder, according to the keys of the waveforms, or according to the current timestamp if the keys are empty.