ScottPlot.NET
GitHub Repo stars

PowerShell Quickstart

Step 1: Get PowerShell Core

Step 2: Build an empty .NET app using ScottPlot

  • dotnet new console
  • dotnet add package scottplot
  • dotnet build

Step 3: Create a PowerShell script

  • Enter the builder folder containing ScottPlot.dll
  • Enter the runtimes folder, select your platform (ex. win-x64)
  • Copy libSkiaSharp and paste it in the folder containing ScottPlot.dll
  • Create myScript.ps1 and copy the following contents into it
  • Run the script using PowerShell Core (not Windows PowerShell)
Add-Type -Path .\ScottPlot.dll
[double[]] $dataX = @( 1, 2, 3, 4, 5 )
[double[]] $dataY = @( 1, 4, 9, 16, 25 )
$plt = [ScottPlot.Plot]::new()
[Void] $plt.Add.Scatter($dataX, $dataY)
[Void] $plt.SavePng("$pwd\quickstart.png", 400, 300)

PowerShell Interactive Notebooks

Doug Finke prepared a YouTube video and GitHub repository demonstrating how to create data visualizations with PowerShell and ScottPlot 4 in the a Polyglot Interactive Notebook.