MatPlotLibNet 1.16.0
See the version list below for details.
dotnet add package MatPlotLibNet --version 1.16.0
NuGet\Install-Package MatPlotLibNet -Version 1.16.0
<PackageReference Include="MatPlotLibNet" Version="1.16.0" />
<PackageVersion Include="MatPlotLibNet" Version="1.16.0" />
<PackageReference Include="MatPlotLibNet" />
paket add MatPlotLibNet --version 1.16.0
#r "nuget: MatPlotLibNet, 1.16.0"
#:package MatPlotLibNet@1.16.0
#addin nuget:?package=MatPlotLibNet&version=1.16.0
#tool nuget:?package=MatPlotLibNet&version=1.16.0
MatPlotLibNet
A .NET 10 / .NET 8 charting library inspired by matplotlib: fluent API, DI-friendly,
server-side SVG / PNG / PDF / animated-GIF export, an MCP server so an AI agent can draw with it, and 83 series types. Ships with 13 map projections and embedded
Natural Earth data, 30 themes, LaTeX-style MathText, O(1) streaming with 53 technical indicators, a control room
(Plt.OpsDashboard() — KPI tiles, state timelines, one shared trend window), and native controls for Blazor, WPF,
MAUI, Avalonia, Uno and ASP.NET Core, plus TypeScript clients for Angular, React and Vue. No JavaScript framework,
no WebView, no SaaS.
Where this is going
The 1.15 line opens the library to agents: MatPlotLibNet.Mcp is a Model Context Protocol server, so a
model can render any of these chart types from a JSON spec and look at the result — and is told which field is
wrong when the spec is not one.
Beside the agent is the reader who cannot see the picture at all. figure.ToDataTables() gives every chart the
data table that carries what the picture carries — HTML, markdown or CSV — and every host that serves the SVG
serves that too.
The 1.14 line before it was control-room work: Plt.OpsDashboard() and the tile anatomy arrived with it,
and the releases since are the fixes and extensions a live operator wall asked for — a secondary Y axis that is
a full citizen, streaming that draws in SVG, 3-D axis titles that clear their own labels, tile captions that
wrap and stay inside their tile, and an ops window whose ticks read as time.
After that the cadence is community-driven: bug fixes, documentation, and whatever real use turns up. Open a Discussion or an Issue — that is what steers the next release. Every release, with its migration notes, is in the CHANGELOG.
Quality bar: a strict per-class coverage gate at ≥90 % line and branch (689 classes, 99.6 % / 97.3 %) across 11,497 tests, with rendering verified against matplotlib pixel-fidelity fixtures.
Documentation
- Wiki — getting started, cheatsheet, all 83 chart types, the control room, styling, streaming, SignalR, packages
- Cookbook — copy-paste examples with rendered output
- Playground — try charts live in the browser
- API Reference — generated from the XML docs
- Benchmarks · Coverage policy · CHANGELOG
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.Mcp | dnx MatPlotLibNet.Mcp |
MCP server — an AI agent renders charts over stdio (cookbook) |
| @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
83 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, stat tile (single-value KPI), state timeline (discrete state segments over time), pair grid, relative rotation graph, streaming line/scatter/signal/candlestick, and more.
MCP server — charts for an AI agent — MatPlotLibNet.Mcp is a
Model Context Protocol server, shipped as a .NET tool a host starts over stdio. Five tools: render_chart (PNG plus a text summary of
what was drawn), save_chart (PNG/SVG/PDF to a file, returning the path it wrote), chart_data_table (the
numbers the picture is drawn from, as markdown — the one question an image cannot answer), list_chart_types
and describe_chart_schema. The spec is the library's own figure JSON, so anything the library draws, an agent can
ask for — and the server refuses a wrong spec by field name before it renders, instead of returning a blank
picture. See the cookbook.
{ "servers": { "MatPlotLibNet.Mcp": { "type": "stdio", "command": "dnx", "args": ["MatPlotLibNet.Mcp", "--yes"] } } }
Control room — Plt.OpsDashboard() composes one operator screen: KPI tiles across the top, state timelines under them, and a shared trend panel, all pinned to one caller-supplied time window (the library never reads the wall clock). The tile carries a Target, a wrapping multi-line Caption, an inline sparkline and a Hatch that means no information; Theme.Alarm names the reserved alarm colours and four operator backgrounds ship with it. BulletGraphSeries replaces the radial gauge.
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, Vec3.FaceNormal + Color.Shade()/Color.Modulate() extension-based shading, Svg3DRotationScript client-side rotation with depth re-sorting, camera-derived back faces (CubeFaceSelection — the panes, cube edges, wall grids and tick rows follow the camera at any azimuth, server-side and during a drag), configurable Pane3DConfig (floor/wall colors), and 3D colorbar support.
Streaming & Realtime — StreamingLineSeries, StreamingScatterSeries, StreamingSignalSeries, StreamingCandlestickSeries backed by RingBuffer<T> with AppendPoint(x, y) — a fixed-capacity circular sequence of anything (64 M appends/s, never allocates on append). 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.
Accessibility — figure.ToDataTables() gives every chart a data table beside the picture (ToHtml(), ToMarkdown(), ToCsv()), which is the text alternative WCAG 1.1.1 asks of a complex image and what an <svg role="img"> cannot be on its own. Served by MapChartTableEndpoint, by MplChart.ShowDataTable, by the GraphQL chartDataTable field and by the MCP chart_data_table tool. Plus ARIA roles and titles, keyboard navigation, the Okabe-Ito colour-blind-safe palette and a high-contrast theme.
142 colormaps — viridis, plasma, turbo, coolwarm, and 138 more (71 base maps, each with an auto-registered reversed _r variant). NumPy-style SIMD numerics (Vec, Mat, Linalg, Fft). Matplotlib look-alike themes. DataFrame integration with 53 technical 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.12)
-
net8.0
- System.Numerics.Tensors (>= 10.0.12)
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.17.1 | 252 | 9/13/2026 |
| 1.17.0 | 245 | 9/12/2026 |
| 1.16.0 | 235 | 9/12/2026 |
| 1.15.1 | 251 | 9/12/2026 |
| 1.15.0 | 244 | 9/11/2026 |
| 1.14.4 | 251 | 9/11/2026 |
| 1.14.3 | 263 | 8/30/2026 |
| 1.14.2 | 275 | 8/17/2026 |
| 1.14.1 | 287 | 8/15/2026 |
| 1.14.0 | 449 | 7/12/2026 |
| 1.13.0 | 315 | 7/4/2026 |
| 1.12.0 | 328 | 6/30/2026 |
| 1.11.2 | 324 | 5/16/2026 |
| 1.11.1 | 310 | 5/16/2026 |
| 1.10.0 | 324 | 5/4/2026 |
| 1.9.0 | 277 | 4/23/2026 |
| 1.8.0 | 274 | 4/22/2026 |
| 1.7.3 | 263 | 4/21/2026 |
| 1.7.2 | 279 | 4/18/2026 |
| 1.7.1 | 247 | 4/18/2026 |