Skip to content

FarNet friendly ScottPlot extension for .NET modules and scripts in PowerShell, F#, JavaScript.

License

Notifications You must be signed in to change notification settings

nightroman/FarNet.ScottPlot

Repository files navigation

FarNet.ScottPlot

ScottPlot PowerShell module and FarNet library

Packages:

Samples

PowerShell module

Install from PSGallery:

Install-Module -Name FarNet.ScottPlot

Explore, 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
...

FarNet library

To install as the FarNet library FarNet.ScottPlot, follow these steps.
See PowerShell FarNet modules for details.

How to use

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.

See also

About

FarNet friendly ScottPlot extension for .NET modules and scripts in PowerShell, F#, JavaScript.

Resources

License

Stars

Watchers

Forks