MatPlotLibNet.Notebooks
1.2.2
dotnet add package MatPlotLibNet.Notebooks --version 1.2.2
NuGet\Install-Package MatPlotLibNet.Notebooks -Version 1.2.2
<PackageReference Include="MatPlotLibNet.Notebooks" Version="1.2.2" />
<PackageVersion Include="MatPlotLibNet.Notebooks" Version="1.2.2" />
<PackageReference Include="MatPlotLibNet.Notebooks" />
paket add MatPlotLibNet.Notebooks --version 1.2.2
#r "nuget: MatPlotLibNet.Notebooks, 1.2.2"
#:package MatPlotLibNet.Notebooks@1.2.2
#addin nuget:?package=MatPlotLibNet.Notebooks&version=1.2.2
#tool nuget:?package=MatPlotLibNet.Notebooks&version=1.2.2
MatPlotLibNet
A .NET 10 / .NET 8 charting library inspired by matplotlib. Fluent API, dependency injection, parallel SVG rendering, polymorphic export (SVG / PNG / PDF / GIF), and multi-platform output to Blazor, MAUI, ASP.NET Core, Angular, React, and Vue.
v1.2.1 — Font-factory subsystem fix + zero-warning CI sweep. The outside-legend clipping bug that v1.1.4's changelog claimed to have fixed turned out to have a deeper root cause: eight duplicate themed-font factories across
AxesRenderer,ChartRenderer,ConstrainedLayoutEngine, andLegendMeasurerhad silently drifted (engine usedDefaultFont.Size − 2, renderer usedDefaultFont.Size). v1.2.1 consolidates them into oneThemedFontProvider— a single source of truth that makes the drift bug class structurally impossible. Seven new drift-regression tests cover every measurer/renderer pair. Every non-MAUI library now builds at 0 warnings / 0 errors (21 warnings cleared, 5 staleColor.Blue/Orangereferences fixed in WebApi + GraphQL samples, 16 xUnit1051 warnings refactored toTestContext.Current.CancellationToken). 3 641 tests green across 7 test projects.v1.2.0 — Bidirectional SignalR interactive charts. Browser wheel-zoom, drag-pan, reset, and legend-toggle round-trip through
ChartHubto a server-authoritativeFigurethat is mutated on a per-chart channel-drained background task and re-published through the existing SignalR fan-out. Pure .NET, no JavaScript charting library, server stays the source of truth. See MatPlotLibNet.AspNetCore README or theSamples/MatPlotLibNet.Samples.AspNetCore+Interactive.razordemos.
Packages
| Package | Install | What it does |
|---|---|---|
| MatPlotLibNet | dotnet add package MatPlotLibNet |
Core: models, fluent API, SVG rendering, JSON, transforms |
| MatPlotLibNet.DataFrame | dotnet add package MatPlotLibNet.DataFrame |
Microsoft.Data.Analysis.DataFrame extension methods — plot, indicators (SMA/EMA/RSI/MACD/…), and polynomial regression from named columns |
| MatPlotLibNet.Skia | dotnet add package MatPlotLibNet.Skia |
PNG, PDF, and animated GIF export via SkiaSharp |
| MatPlotLibNet.Blazor | dotnet add package MatPlotLibNet.Blazor |
MplChart + MplLiveChart Razor components with SignalR |
| MatPlotLibNet.AspNetCore | dotnet add package MatPlotLibNet.AspNetCore |
REST endpoints, SignalR hub, IChartPublisher |
| MatPlotLibNet.Interactive | dotnet add package MatPlotLibNet.Interactive |
figure.ShowAsync() — browser popup, no server needed |
| MatPlotLibNet.GraphQL | dotnet add package MatPlotLibNet.GraphQL |
GraphQL queries + subscriptions via HotChocolate |
| MatPlotLibNet.Maui | dotnet add package MatPlotLibNet.Maui |
Native MplChartView via Microsoft.Maui.Graphics |
| MatPlotLibNet.Notebooks | #r "nuget: MatPlotLibNet.Notebooks" |
Inline SVG in Polyglot / Jupyter notebooks |
| @matplotlibnet/angular | npm install @matplotlibnet/angular |
Angular components + TypeScript SignalR client |
| @matplotlibnet/react | npm install @matplotlibnet/react |
React hooks + components + TypeScript SignalR client |
| @matplotlibnet/vue | npm install @matplotlibnet/vue |
Vue 3 composables + TypeScript SignalR client |
Quick start
using MatPlotLibNet;
using MatPlotLibNet.Styling;
double[] x = [1, 2, 3, 4, 5];
double[] y = [2, 4, 3, 5, 1];
Plt.Create()
.WithTitle("My First Chart")
.WithTheme(Theme.Dark)
.Plot(x, y, s => { s.Color = Color.Blue; s.Label = "Data"; })
.WithLegend()
.Save("chart.svg");
61 series types — line, scatter, bar, histogram, pie, box, violin, heatmap, contour, candlestick, OHLC, treemap, sunburst, Sankey, polar, polar heatmap, 3D surface, Bar3D, PlanarBar3D, radar, waterfall, funnel, gauge, and more.
Bidirectional SignalR (v1.2.0) — FigureBuilder.WithServerInteraction("chart-id", i => i.All()) opts a figure into server-authoritative interaction. The embedded dispatcher script invokes ChartHub.OnZoom / OnPan / OnReset / OnLegendToggle, a FigureRegistry-owned background reader task mutates the figure through a stacked-record event hierarchy (ZoomEvent : AxisRangeEvent : FigureInteractionEvent), and the updated SVG streams back through the existing publish fan-out. Natural coalescing — bursts of wheel events produce exactly one re-render per batch. Works with any @microsoft/signalr host page; first-class Blazor sample ships in Samples/MatPlotLibNet.Samples.Blazor.
Accessibility — SVG exports carry role="img", <title>/<desc>, and ARIA labels on all structural groups; all 5 interactive JS features are keyboard-navigable; Okabe-Ito color-blind safe palette (Theme.ColorBlindSafe); WCAG AAA high-contrast theme (Theme.HighContrast).
Matplotlib look-alike themes — Theme.MatplotlibClassic mimics matplotlib's pre-2.0 default (white background, the iconic bgrcmyk cycle, DejaVu Sans 12pt). Theme.MatplotlibV2 mimics the modern matplotlib default since 2017 (white background, soft-black text, the tab10 10-color cycle, DejaVu Sans 10pt). Drop-in matplotlib look in pure .NET — no Python runtime required.
Series capability interfaces — IHasColor, IHasAlpha, IHasEdgeColor, ILabelable allow polymorphic access to common series properties without casting; enables generic theming and rendering utilities.
NumPy-style numerics — Mat matrix type with SIMD operators, Linalg (Solve/Inv/Det/Eigh/Svd), NpStats (Diff/Median/Histogram/Argsort/Unique/Cov/Corrcoef), NpRandom (Normal/Uniform/Lognormal/Integers), and Fft.Inverse/Frequencies/Shift — all zero new dependencies, pure C# + TensorPrimitives.
Broken / discontinuous axis — AxisBreak + BreakStyle (Zigzag, Straight, None); WithXBreak / WithYBreak on the fluent builder; visual markers drawn at break boundaries.
DataFrame indicator + regression bridges — MatPlotLibNet.DataFrame now includes DataFrameIndicatorExtensions (16 methods: SMA, EMA, RSI, Bollinger, OBV, MACD, DrawDown, ADX, ATR, CCI, WilliamsR, Stochastic, ParabolicSar, KeltnerChannels, VWAP) and DataFrameNumericsExtensions (PolyFit, PolyEval, ConfidenceBand) — compute indicators and polynomial regressions directly from named DataFrame columns.
Documentation
Full documentation is on the GitHub Wiki:
- Getting Started — installation, output formats, subplots
- Package Map — all packages in detail
- DataFrame —
MatPlotLibNet.DataFrame: charting, indicators, and regression fromMicrosoft.Data.Analysis.DataFrame - Notebooks — Polyglot Notebooks + Jupyter inline rendering
- Chart Types — all 61 series with examples
- Styling — themes, colormaps, PropCycler
- Matplotlib Themes —
Theme.MatplotlibClassicandTheme.MatplotlibV2look-alikes - Accessibility — SVG semantics, keyboard navigation, color-blind palette, high-contrast theme
- Advanced — date axes, math text, animations, GIF, real-time
- Benchmarks — SVG rendering, SIMD transforms, indicators
- Roadmap — version history and planned phases
- Contributing — build, test, coding conventions
License
MIT — free for any use, open-source or commercial, with no copyleft conditions.
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- MatPlotLibNet (>= 1.2.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.2 | 22 | 4/15/2026 |
| 1.2.1 | 24 | 4/15/2026 |
| 1.2.0 | 29 | 4/15/2026 |
| 1.1.4 | 30 | 4/15/2026 |
| 1.1.3 | 85 | 4/13/2026 |
| 1.1.1 | 85 | 4/12/2026 |
| 1.1.0 | 78 | 4/12/2026 |
| 1.0.2 | 79 | 4/12/2026 |
| 1.0.1 | 76 | 4/12/2026 |
| 1.0.0 | 75 | 4/12/2026 |
| 0.9.1 | 80 | 4/12/2026 |
| 0.9.0 | 84 | 4/11/2026 |
| 0.8.9 | 81 | 4/11/2026 |
| 0.8.8 | 83 | 4/11/2026 |
| 0.8.7 | 77 | 4/11/2026 |
| 0.8.6 | 78 | 4/11/2026 |
| 0.8.5 | 76 | 4/11/2026 |
| 0.8.4 | 79 | 4/11/2026 |
| 0.8.3 | 77 | 4/11/2026 |
| 0.8.2 | 79 | 4/11/2026 |