GitHub - dfinke/PowerShellScottPlot (original) (raw)
PowerShell ScottPlot
Uses Polyglot Interactive Notebooks to demonstrate the capabilities of ScottPlot via PowerShell.
Check out the video
This walks through creating data visualizations with PowerShell and ScottPlot in the interactive notebook rendering visualizations inline.
ScottPlot
Is a free and open-source plotting library for .NET that makes it easy to interactively display large datasets.
How to run
- Follow these instructions to setup VS Code and the Polyglot Interactive Notebooks extension
- Clone the repo locally
- Finally, Open the
ScottPlot.ipynbfile in VS Code
Summary
There are two helper PowerShell scripts.
- ScottPlotHelper.ps1
- Loads the
ScottPlot.dllandpsgraphNB.ps1 - Has the
Show-ScottPlotInNotebookfunction
*Show-ScottPlotInNotebook <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi><mi>l</mi><mi>t</mi><mi mathvariant="normal">"</mi></mrow><annotation encoding="application/x-tex">plt "</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8889em;vertical-align:-0.1944em;"></span><span class="mord mathnormal">plt</span><span class="mord">"</span></span></span></span>pwd\test.png"
* Takes a ScottPlot plot, and name of the image file to generate
* Generates the image file
* Calls theShow-ImageInNotebookfunction frompsgraphNB.ps1
* Then removes the image file
- Loads the
- PSGraphNB.ps1
- Has the
Show-ImageInNotebookfunction
*Show-ImageInNotebook "$pwd\test.png"
* Takes the name of the image file to display
* Displays the image in the output cell of the notebook
- Has the
What's in the notebook
A simple way to share Polyglot Notebooks
Check out the rendered notebook and charts here in nbviewer.



