DotnetMatplotlib 0.0.6

dotnet add package DotnetMatplotlib --version 0.0.6
                    
NuGet\Install-Package DotnetMatplotlib -Version 0.0.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotnetMatplotlib" Version="0.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotnetMatplotlib" Version="0.0.6" />
                    
Directory.Packages.props
<PackageReference Include="DotnetMatplotlib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DotnetMatplotlib --version 0.0.6
                    
#r "nuget: DotnetMatplotlib, 0.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DotnetMatplotlib@0.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DotnetMatplotlib&version=0.0.6
                    
Install as a Cake Addin
#tool nuget:?package=DotnetMatplotlib&version=0.0.6
                    
Install as a Cake Tool

dotnet-matplotlib

.NET NuGet License: MIT

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 familiar pyplot-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, pcolormesh with colormaps (viridis, gray, jet, hot) and colorbar
  • Contours: contour (marching squares), contourf
  • Patches & line/poly collections, hatching, the full marker set
  • Legends (including automatic best placement), text & annotations
  • Subplots with tight_layout / constrained_layout
  • Scales: linear / log / symlog / logit; categorical & date axes
  • 3D: plot3D, scatter3D, plot_wireframe
  • Style sheets and rcParams parsing (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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on DotnetMatplotlib:

Package Downloads
DotnetMatplotlib.Interactive

.NET Interactive / Polyglot / Jupyter notebook integration for DotnetMatplotlib: inline SVG rendering of figures in notebook cells.

DotnetMatplotlib.DataFrame

Microsoft.Data.Analysis DataFrame plotting extensions for DotnetMatplotlib: df.PlotLine / PlotScatter / PlotBar / PlotHist, returning a Pyplot (pandas .plot() style).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.6 32 6/6/2026