FarNet friendly ScottPlot extension for .NET modules and scripts in PowerShell, F#, JavaScript.
The package is designed for FarNet. To install FarNet and FarNet.ScottPlot, follow these steps.
The NuGet package FarNet.ScottPlot
is installed to %FARHOME%\FarNet\Lib\FarNet.ScottPlot
.
Use FarNet.ScottPlot.FormPlot
which inherits the original ScottPlot.Plot
.
Setup the plot using the original members and call Show()
to show the form.
For live plots, update and show in a loop until the plot is cancelled.
Check for IsCancellationRequested
or use the CancellationToken
.
Use ShowAsync(int)
or Show(int)
for intervals between updates.
Note that Show()
shows the form and immediately returns. This is the desired
behaviour for scripts in Far Manager or interactive pwsh
and fsx
consoles.
Use Show(-1)
in order to block the current thread and avoid immediate console
exits on running scripts by non-interactive pwsh
or fsx
, see samples.