MatPlotLibNet 1.7.3
See the version list below for details.
dotnet add package MatPlotLibNet --version 1.7.3
NuGet\Install-Package MatPlotLibNet -Version 1.7.3
<PackageReference Include="MatPlotLibNet" Version="1.7.3" />
<PackageVersion Include="MatPlotLibNet" Version="1.7.3" />
<PackageReference Include="MatPlotLibNet" />
paket add MatPlotLibNet --version 1.7.3
#r "nuget: MatPlotLibNet, 1.7.3"
#:package MatPlotLibNet@1.7.3
#addin nuget:?package=MatPlotLibNet&version=1.7.3
#tool nuget:?package=MatPlotLibNet&version=1.7.3
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, Avalonia, Uno Platform, ASP.NET Core, Angular, React, and Vue.
๐งญ Stabilisation phase
After twelve feature releases (v1.0 โ v1.7.3) MatPlotLibNet now covers the practical 90% of matplotlib's surface: 74 series types, 13 map projections with embedded Natural Earth data, 26 themes, MathText with operator limits and matrices, streaming with O(1) indicators, native UI controls for Blazor / Avalonia / Uno / WPF / MAUI, fidelity tests against a pinned matplotlib reference, and 13 NuGet packages.
v1.7.1 started the stabilisation period; v1.7.3 continues it. The focus shifts from "ship more features" to:
- ๐ Bug fixes only (no new public API), driven by community use and the
โฅ90/90coverage gate - ๐งช Test coverage uplift (see
docs/COVERAGE.md) โ 554 classes, all โฅ90/90. CI strict gate active. Coverage: 98.49% line / 95.19% branch (was 97.26/90.50 pre-Phase-K, 94.94/85.30 pre-refactor). Three god-classes decomposed into 32 extracted SOLID subclasses (each 100L/100B);PlaygroundControllerextracted from Blazor @code (SRP fix, 12 new tests); two IEEE-754 branch edge cases closed. Byte-level SVG output unchanged vs shipped v1.7.3 (verified by 10 033-case equivalence fuzz)
Why v1.7.3 is a new NuGet release, not just a tag. The strict 90/90-per-class coverage gate introduced in v1.7.2 turned out to require structural production-code changes in the large renderer classes โ methods were too coarse-grained for any single test to cover a coherent branch family. Phase L extracted focused
internalhelpers (RenderGridLines,RenderAxisTicks,DrawBreakSegments,BuildWedgePath,PrepareTransform,ComputeNodeLabelAnchor), introduced generic base classes (CircularRenderer<T>,PolarTransformRenderer<T>,OhlcStreamingIndicatorTests<T>), and eliminated hundreds of lines of parallel duplication. No public API surface changed and SVG output is byte-identical, but the scope of internal restructuring crossed the version-bump bar.
- ๐ Documentation polish โ cookbook examples, API XML doc completeness
- ๐ฑ Listening โ what should v2 be? Open a Discussion or Issue with what's missing for your use case. The next major direction will be guided by what real users need, not by a feature checklist.
No timeline for v1.8.0 yet โ when it ships, it will be community-driven.
Browser interactions are automatic.
FigureBuilder.WithBrowserInteraction()is the single switch โ pan/zoom, legend toggle + drag, treemap drilldown, sankey hover, 3D rotation, rich tooltips, highlight, and brush selection all light up together. Each script self-detects whether it has anything to do (e.g. the treemap script is silent when the chart has no treemap nodes), so there's no per-feature toggle for the user to manage.
For the full v1.7.3 release notes (Phase L SOLID/DRY refactor, NuGet CI publish, Playground AxisBreaks + MinorGrid examples) and all prior history, see the CHANGELOG.
Documentation
Full documentation is on the GitHub Wiki, the Cookbook (runnable examples with rendered images), and the API Reference (generated from XML doc comments):
- Playground โ try charts live in the browser โ pick an example, tweak parameters, see the SVG update instantly
- Cookbook โ copy-paste code examples with rendered output for every chart type
- API Reference โ full API documentation from source
- Getting Started โ installation, output formats, subplots
- Fluent Cheatsheet โ one-page reference for
Plt/FigureBuilder/AxesBuilder - Package Map โ all 13 NuGet + 3 npm packages in detail
- Chart Types โ all 74 series with code examples
- Streaming & Realtime โ ring buffers, StreamingFigure, axis scaling, 11 streaming indicators, platform controls
- Interactive Controls โ Avalonia + Uno native controls, managed interaction layer
- Bidirectional SignalR โ server-authoritative interactive charts, event hierarchy, hub wiring
- DataFrame โ indicators, polynomial regression from
Microsoft.Data.Analysis.DataFrame - Notebooks โ Polyglot Notebooks + Jupyter inline rendering
- Styling โ themes, colormaps, PropCycler
- Accessibility โ SVG semantics, keyboard navigation, color-blind palette
- 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
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.Avalonia | dotnet add package MatPlotLibNet.Avalonia |
Native MplChartControl for Avalonia 12 โ Skia backend, optional local interaction |
| MatPlotLibNet.Uno | dotnet add package MatPlotLibNet.Uno |
Native MplChartElement for Uno Platform (WinUI 3 / Android / iOS / macCatalyst) |
| MatPlotLibNet.Wpf | dotnet add package MatPlotLibNet.Wpf |
Native WPF MplChartControl via SkiaSharp โ all 9 interaction modifiers |
| MatPlotLibNet.Geo | dotnet add package MatPlotLibNet.Geo |
13 map projections, GeoJSON parser, Natural Earth 110m data, geographic polygons |
| 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");
Features
74 series types โ line, scatter, bar, histogram, pie, box, violin, heatmap, contour, candlestick, OHLC, treemap, sunburst, Sankey, polar, polar heatmap, 3D surface, Bar3D, PlanarBar3D, Line3D, Trisurf3D, Contour3D, Quiver3D, Voxels, Text3D, radar, waterfall, funnel, gauge, streaming line/scatter/signal/candlestick, and more.
Native UI controls โ MplChartControl for Avalonia 12 and MplChartElement for Uno Platform render charts natively via SkiaSharp โ no browser, no WebView, no SignalR required. 9 interaction modifiers: pan (drag), zoom (scroll), 3D rotation (right-drag), rectangle zoom (Ctrl+drag), brush select (Shift+drag), span select (Alt+drag), legend toggle (click), crosshair (passive), hover tooltip. Toolbar state model, view history (back/forward), data cursor (click-to-pin), tick mirroring, tight margins.
MathText โ LaTeX-like inline math in any label or title: $\alpha^{2}$, $\frac{a}{b}$, $\sqrt{x}$, $\hat{x}$, $\mathbf{F}$, $\mathbb{R}$. 96 symbol mappings (Greek, math operators, arrows, relations, set/logic, blackboard bold), fractions, square roots, accents, font variants, spacing, and scaling delimiters.
3-D charts โ 12 series types: Surface, Scatter3D, Bar3D, PlanarBar3D, Line3D, Trisurf3D (Delaunay), Contour3D (marching squares), Quiver3D (vector field), Voxels (face-culled cubes), Text3D (annotations). Full Projection3D pipeline, DepthQueue3D painter's algorithm, LightingHelper shading, Svg3DRotationScript client-side rotation with depth re-sorting, configurable Pane3DConfig (floor/wall colors), and 3D colorbar support.
Streaming & Realtime โ StreamingLineSeries, StreamingScatterSeries, StreamingSignalSeries, StreamingCandlestickSeries backed by DoubleRingBuffer with AppendPoint(x, y). StreamingFigure provides throttled re-rendering and auto-scaling axes (SlidingWindow, StickyRight, AutoScale). 11 streaming indicators (SMA, EMA, RSI, Bollinger, MACD, OBV, ATR, Stochastic, WilliamsR, CCI, VWAP) auto-attach to candlestick data. Streaming controls for Avalonia, Uno, MAUI, Blazor, and ASP.NET Core. SVG diff engine for bandwidth optimization. Rx IObservable<T> adapter.
Geographic projections โ MatPlotLibNet.Geo package with 5 map projections (PlateCarree, Mercator, Robinson, Orthographic, LambertConformal), GeoJSON parser, Natural Earth 110m embedded data, and GeoPolygonSeries for coastlines/borders/choropleth. Symlog axis scale for data spanning positive and negative ranges.
Bidirectional SignalR โ server-authoritative interactive charts with mutation events (zoom, pan, reset, legend toggle) and notification events (brush-select, hover). Stacked-record event hierarchy, natural coalescing, per-caller hover responses.
104 colormaps โ viridis, plasma, turbo, coolwarm, and 100 more. NumPy-style SIMD numerics (Vec, Mat, Linalg, Fft). Accessibility (ARIA, keyboard, Okabe-Ito palette, high-contrast theme). Matplotlib look-alike themes. DataFrame integration with 16 financial indicators. Broken axes. Publication-quality SVG/PNG/PDF/GIF export.
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.7)
-
net8.0
- System.Numerics.Tensors (>= 10.0.7)
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 |