MatPlotLibNet 1.2.0
See the version list below for details.
dotnet add package MatPlotLibNet --version 1.2.0
NuGet\Install-Package MatPlotLibNet -Version 1.2.0
<PackageReference Include="MatPlotLibNet" Version="1.2.0" />
<PackageVersion Include="MatPlotLibNet" Version="1.2.0" />
<PackageReference Include="MatPlotLibNet" />
paket add MatPlotLibNet --version 1.2.0
#r "nuget: MatPlotLibNet, 1.2.0"
#:package MatPlotLibNet@1.2.0
#addin nuget:?package=MatPlotLibNet&version=1.2.0
#tool nuget:?package=MatPlotLibNet&version=1.2.0
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.0 — Bidirectional SignalR interactive charts. Browser wheel-zoom, drag-pan, reset, and legend-toggle now 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.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- System.Numerics.Tensors (>= 10.0.6)
-
net8.0
- System.Numerics.Tensors (>= 10.0.6)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on MatPlotLibNet:
| Package | Downloads |
|---|---|
|
MatPlotLibNet.AspNetCore
ASP.NET Core endpoint helpers for MatPlotLibNet. Serves chart JSON specs for Angular and other SPA frameworks. |
|
|
MatPlotLibNet.Skia
PNG and PDF export for MatPlotLibNet charts using SkiaSharp. |
|
|
MatPlotLibNet.Blazor
Blazor components for MatPlotLibNet charting library. Renders charts as inline SVG. |
|
|
MatPlotLibNet.Maui
MAUI controls for MatPlotLibNet charting library. Renders charts via Microsoft.Maui.Graphics. |
|
|
MatPlotLibNet.Notebooks
Polyglot Notebooks / Jupyter support for MatPlotLibNet. Renders Figure inline as SVG in notebook cells. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.10.0 | 172 | 5/4/2026 |
| 1.9.0 | 236 | 4/23/2026 |
| 1.8.0 | 237 | 4/22/2026 |
| 1.7.3 | 230 | 4/21/2026 |
| 1.7.2 | 238 | 4/18/2026 |
| 1.7.1 | 215 | 4/18/2026 |
| 1.7.0 | 223 | 4/17/2026 |
| 1.6.0 | 217 | 4/17/2026 |
| 1.5.0 | 219 | 4/17/2026 |
| 1.4.1 | 211 | 4/17/2026 |
| 1.4.0 | 196 | 4/17/2026 |
| 1.3.0 | 214 | 4/16/2026 |
| 1.2.2 | 201 | 4/15/2026 |
| 1.2.1 | 201 | 4/15/2026 |
| 1.2.0 | 206 | 4/15/2026 |
| 1.1.4 | 198 | 4/15/2026 |
| 1.1.3 | 218 | 4/13/2026 |
| 1.1.1 | 217 | 4/12/2026 |
| 1.1.0 | 199 | 4/12/2026 |
| 1.0.2 | 203 | 4/12/2026 |