DotnetMatplotlib 0.0.6
dotnet add package DotnetMatplotlib --version 0.0.6
NuGet\Install-Package DotnetMatplotlib -Version 0.0.6
<PackageReference Include="DotnetMatplotlib" Version="0.0.6" />
<PackageVersion Include="DotnetMatplotlib" Version="0.0.6" />
<PackageReference Include="DotnetMatplotlib" />
paket add DotnetMatplotlib --version 0.0.6
#r "nuget: DotnetMatplotlib, 0.0.6"
#:package DotnetMatplotlib@0.0.6
#addin nuget:?package=DotnetMatplotlib&version=0.0.6
#tool nuget:?package=DotnetMatplotlib&version=0.0.6
dotnet-matplotlib
A native .NET 10 port of Matplotlib — the de-facto 2D plotting library for Python — rebuilt in idiomatic F# following Object-Oriented and Domain-Driven Design principles.
A faithful port of Matplotlib's plotting model (
Figure/Axes/Artist/Transform/Backend) with a familiarpyplot-style facade, producing publication-quality output with zero native dependencies — pure-managed SVG, PNG and PDF backends.
A screenshot gallery is available on the project page.
Install
dotnet add package DotnetMatplotlib
open Matplotlib
let plt = Pyplot()
plt.Plot([| 1.0; 2.0; 3.0; 4.0 |], [| 1.0; 4.0; 9.0; 16.0 |], color = "C0", label = "y = x^2")
|> ignore
plt.Title "Hello, dotnet-matplotlib"
plt.XLabel "x"
plt.YLabel "y"
plt.Legend()
plt.Savefig "hello.svg"
Output formats
Savefig chooses the format from the file extension. SVG, PNG and PDF are
all pure-managed and cross-platform (zero native dependencies):
plt.Savefig "plot.svg" // vector SVG
plt.Savefig "plot.png" // raster PNG (software rasterizer, anti-aliased)
plt.Savefig "plot.pdf" // vector PDF
Text uses TrueType fonts discovered from the system. To select a font, set the
default family before plotting — the equivalent of Matplotlib's
rcParams["font.family"]:
plt.FontFamily <- "serif"
Animations are written as looping GIFs:
// factory builds the Figure for each frame index
plt.SaveGif("wave.gif", 30, (fun i -> buildFrame i), fps = 20)
Notebooks
In a .NET Interactive / Polyglot / Jupyter notebook, add
#r "nuget: DotnetMatplotlib.Interactive" and call
Matplotlib.Interactive.Notebook.register () once — figures then render inline
as SVG.
DataFrames
DotnetMatplotlib.DataFrame adds pandas-style plotting extensions to
Microsoft.Data.Analysis.DataFrame: df.PlotLine("x","y"), PlotScatter,
PlotBar, PlotHist — each returns a Pyplot.
AI agents (MCP)
DotnetMatplotlib.Mcp is a Model Context Protocol server (install as a .NET tool:
dotnet tool install -g DotnetMatplotlib.Mcp, command matplotlib-mcp) that lets
AI agents create line / scatter / bar / heatmap plots saved as PNG / SVG / PDF.
Features
- Plots:
plot,scatter,bar/barh,fill_between,step,errorbar,stem - Statistics & fields:
hist2d,boxplot,violinplot,quiver,streamplot - Images:
imshow,pcolormeshwith colormaps (viridis,gray,jet,hot) andcolorbar - Contours:
contour(marching squares),contourf - Patches & line/poly collections, hatching, the full marker set
- Legends (including automatic
bestplacement), text & annotations - Subplots with
tight_layout/constrained_layout - Scales: linear / log / symlog / logit; categorical & date axes
- 3D:
plot3D,scatter3D,plot_wireframe - Style sheets and
rcParamsparsing (ggplot,dark_background, …) - Backends: SVG, PNG and PDF (pure-managed), an interactive window (Windows), and animated GIF
License
dotnet-matplotlib is released under the MIT license.
Citation
Hunter, J. D. (2007). Matplotlib: A 2D graphics environment. Computing in Science & Engineering, 9(3), 90–95. https://doi.org/10.1109/MCSE.2007.55
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- FSharp.Core (>= 8.0.400)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on DotnetMatplotlib:
| Package | Downloads |
|---|---|
|
DotnetMatplotlib.DataFrame
Microsoft.Data.Analysis DataFrame plotting extensions for DotnetMatplotlib: df.PlotLine / PlotScatter / PlotBar / PlotHist, returning a Pyplot (pandas .plot() style). |
|
|
DotnetMatplotlib.Interactive
.NET Interactive / Polyglot / Jupyter notebook integration for DotnetMatplotlib: inline SVG rendering of figures in notebook cells. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.6 | 32 | 6/6/2026 |