Skip to content
xkqg edited this page Apr 17, 2026 · 90 revisions

MatPlotLibNet Wiki

Matplotlib-inspired charting for .NET — SVG/PNG/PDF output, 74 series types, fluent API, streaming & realtime, and first-class support for Blazor, MAUI, Avalonia, Uno Platform, ASP.NET Core, and JS frameworks.

Current version: 1.4.1 · NuGet · Changelog · License: MIT

v1.4.1 — Interactive Polish. Closes the interactivity gap with matplotlib:

  • Native 3D rotation — right-drag on 3D axes rotates the camera (azimuth/elevation). Arrow keys ±5°, Home resets. Works on all native controls.
  • Rectangle zoom — Ctrl+drag draws a zoom box. Crosshair — vertical + horizontal lines at mouse position. Span select — Alt+drag selects X-range.
  • View history — back/forward through zoom/pan snapshots (50-entry stack). Data cursor — click to pin annotation callout.
  • Toolbar state model — InteractionToolbar with Pan/Zoom/Rotate3D/Home/DataCursor buttons. Platform-agnostic.
  • Axis polish — .WithYTicksMirrored() ticks on both sides. .WithTightMargins() data touches spines.
  • 9 interaction modifiers (was 6). 4 234 tests green across 11 test projects.

For earlier releases, see the full CHANGELOG or the Roadmap.


Who Should Use This?

MatPlotLibNet is built for .NET developers who need charting that fits naturally into their existing stack — no JavaScript framework, no third-party SaaS, no extra runtime.

You are… MatPlotLibNet gives you…
Blazor / ASP.NET Core developer Drop-in <MplChart> and <MplLiveChart> components; SignalR push; REST endpoint — all wired with standard DI
Avalonia developer Native MplChartControl via SkiaSharp — IsInteractive="True" for pan / zoom / reset / brush-select, no WebView
Uno Platform developer Native MplChartElement via SkiaSharp — Windows, Android, iOS, macCatalyst from one codebase
MAUI developer Native MplChartView control via Microsoft.Maui.Graphics — no WebView
Data scientist / analyst Inline SVG in Polyglot Notebooks or Jupyter; 74 series types; MatPlotLibNet.DataFrame for plotting, 16 financial indicators, and polynomial regression directly from Microsoft.Data.Analysis.DataFrame column names
Financial / trading app developer Candlestick, OHLC, 13 technical indicators (SMA, EMA, RSI, MACD, Bollinger, Stochastic, …), backtesting panels
Full-stack .NET + JS developer TypeScript clients for Angular, React, and Vue — same SignalR hub, same chart definitions
Backend / headless pipeline Render SVG, PNG, PDF, or animated GIF server-side with zero UI dependencies

Why MatPlotLibNet?

vs. ScottPlot / OxyPlot / LiveCharts2

These are excellent WinForms / WPF / MAUI renderers. MatPlotLibNet targets the web and server first: SVG rendered on the server, pushed to any browser client over SignalR. No canvas, no WebAssembly boot cost, no browser rendering differences.

vs. Plotly.NET

Plotly.NET emits JavaScript that runs in the browser. MatPlotLibNet renders entirely in .NET — the browser receives finished SVG. That means no JS dependency, consistent output, inline SVG in the DOM (CSS-styleable, accessible, print-quality), and rendering that scales with your server hardware.

vs. SciChart / Syncfusion

Commercial libraries with per-developer or per-app licensing. MatPlotLibNet is MIT — free for any use, open-source or commercial, with no copyleft conditions.

Key differentiators at a glance

MatPlotLibNet
Rendering Server-side SVG — zero client cost
Output SVG, PNG, PDF, JSON, animated GIF
Native controls MplChartControl (Avalonia 12), MplChartElement (Uno Platform) — SkiaSharp, no WebView
Real-time SignalR push + streaming series with ring buffers, 11 incremental indicators, throttled re-rendering
Series types 74 — including 12 3D, 4 streaming, polar, financial, hierarchical, Sankey, vector
Math text $\frac{a}{b}$, $\sqrt{x}$, $\hat{y}$, $\mathbb{R}$ — 96 symbol mappings
Performance AVX SIMD coordinate transform, parallel subplot rendering
License MIT — no copyleft, free for any use
Dependencies Zero for SVG; SkiaSharp opt-in for PNG/PDF/GIF/native controls

Quick Start

dotnet add package MatPlotLibNet
Plt.Create()
   .WithTitle("Hello MatPlotLibNet")
   .Plot(x, y, s => { s.Color = Color.Blue; s.Label = "Data"; })
   .WithLegend()
   .Save("chart.svg");

MatPlotLibNet dashboard


Documentation

Resource Contents
Playground Try charts live in your browser — pick an example, change theme/size, see the SVG update instantly
Cookbook Code examples with rendered images — copy, paste, chart
API Reference Full API documentation generated from XML doc comments

Wiki Pages

Page Contents
Getting Started Installation, quick start, output formats (SVG/PNG/PDF/JSON/GIF)
Fluent Cheatsheet One-page reference for Plt / FigureBuilder / AxesBuilder — ships with v1.1.4
Package Map All 11 NuGet packages + 3 JS packages explained
Notebooks Polyglot Notebooks + Jupyter — inline SVG, Display(), tips
Chart Types All 74 series types with code examples
Styling Themes, colors, colormaps, rcParams, PropCycler
Advanced Layouts, date axes, math text, animations, real-time charts
Streaming New in v1.4.0 — ring buffers, StreamingFigure, axis scaling, 11 streaming indicators, platform controls
Interactive Controls Avalonia + Uno native controls, managed interaction layer, server mode
Bidirectional SignalR New in v1.2.0 — server-authoritative interactive charts, event hierarchy, FigureRegistry, hub wiring
Benchmarks SVG rendering, SIMD transforms, indicators, JSON, PNG/PDF
Roadmap Version history; v1.3.0 complete
Contributing How to build, test, and contribute

At a Glance

Series types 74 — line, scatter, bar, financial, statistical, 12 3D, 4 streaming, polar, hierarchical, Sankey, vector
Output formats SVG (built-in), PNG, PDF, JSON, animated GIF
Platforms .NET 10 / .NET 8, Blazor, Avalonia, Uno Platform, MAUI, ASP.NET Core, Angular, React, Vue, Jupyter
Native controls MplChartControl (Avalonia 12), MplChartElement (Uno/WinUI 3) — SkiaSharp, no WebView
Real-time SignalR push + bidirectional interaction (zoom, pan, reset, legend toggle, brush-select, hover)
Math text LaTeX-like inline math: $\frac{a}{b}$, $\sqrt{x}$, $\hat{y}$, $\mathbb{R}$, $\alpha^{2}$ — 96 symbol mappings
Date axes Auto tick selection from years down to seconds
Layout Constrained layout engine — auto-computes margins from text extents
Transform AVX SIMD single-pass coordinate transform — up to 11.8× faster than naive
Packages 11 NuGet + 3 npm — core, Skia, Blazor, AspNetCore, Avalonia, Uno, MAUI, DataFrame, Interactive, GraphQL, Notebooks
Tests 4,234 tests across 11 test projects — including 146 dual-theme matplotlib fidelity tests pixel-verified against matplotlib 3.10.8

Clone this wiki locally