ScottPlot PowerShell module and FarNet library
Packages:
- PowerShell 7.4 module, PSGallery FarNet.ScottPlot
- FarNet library, NuGet FarNet.ScottPlot
Install from PSGallery:
Install-Module -Name FarNet.ScottPlotExplore, see also about_FarNet.ScottPlot.help.txt:
# import and get module commands
Import-Module -Name FarNet.ScottPlot
Get-Command -Module FarNet.ScottPlot
# get module and commands help
help about_FarNet.ScottPlot
help Show-FarPlotHistogram
help Show-FarPlotScatter
help Show-FarPlotSignal
...To install as the FarNet library FarNet.ScottPlot, follow these steps.
See PowerShell FarNet modules for details.
Use the special ScottPlot.FarPlot which inherits and extends ScottPlot.Plot.
Setup the plot using the original members and call Show() to show the form.
For live plots, if possible, use timer with FormInterval and FormUpdate.
Alternatively, 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 console exits on
running scripts by non-interactive pwsh or fsx, see samples.