MatPlotLibNet.WinForms
1.32.0
dotnet add package MatPlotLibNet.WinForms --version 1.32.0
NuGet\Install-Package MatPlotLibNet.WinForms -Version 1.32.0
<PackageReference Include="MatPlotLibNet.WinForms" Version="1.32.0" />
<PackageVersion Include="MatPlotLibNet.WinForms" Version="1.32.0" />
<PackageReference Include="MatPlotLibNet.WinForms" />
paket add MatPlotLibNet.WinForms --version 1.32.0
#r "nuget: MatPlotLibNet.WinForms, 1.32.0"
#:package MatPlotLibNet.WinForms@1.32.0
#addin nuget:?package=MatPlotLibNet.WinForms&version=1.32.0
#tool nuget:?package=MatPlotLibNet.WinForms&version=1.32.0
MatPlotLibNet.WinForms
A chart in a Windows Forms window. You put one control on a form and hand it a figure; with IsInteractive the reader can zoom with
the wheel, pan with a drag, turn a 3-D chart and select a region in the units of the data. It draws natively with SkiaSharp: no
WebView, no browser.
Start a form with a chart
To add a chart to a Windows Forms project you have, three steps.
1. Add the packages. MatPlotLibNet draws the figure and this package shows it:
dotnet add package MatPlotLibNet
dotnet add package MatPlotLibNet.WinForms
The project must target Windows 10 version 2004 or later (net10.0-windows10.0.19041.0), because the SkiaSharp view for Windows
Forms does.
2. Put the control on the form. In the form's constructor, after the line that loads the form, make the control:
var chart = new MplChartControl { IsInteractive = true };
Then add it to the form's Controls, like any other control, and set its Dock property to Fill if it should fill the form.
3. Give it a figure. Build the figure and set it on the control:
double[] x = [0, 1, 2, 3, 4, 5, 6];
double[] y = [0, 1, 4, 9, 16, 25, 36];
chart.Figure = Plt.Create().WithTitle("Squares").Plot(x, y).Build();
Run it and the form shows the squares of 0 to 6 as a line:

Give the control another figure at any time and it draws that one; the
pan and zoom follow the new figure. You can also drop MplChartControl on a form in the designer and set its Figure in code.
A chart that keeps changing
MplStreamingChartControl follows a StreamingFigure and draws it again as data arrives, so the figure stays the same object for
the life of the chart. WinFormsAnimationTimer ticks on the UI thread, which is what an animation needs to draw on a form.
A chart whose gestures a server decides
WithServerInteraction(send) sends each gesture to a server instead of applying it here; whoever receives it applies it.
Where next
- Line charts: every way to draw a line, with the pictures.
- Package map: what each of the packages does.
- The same control for WPF.
- It is Windows only, like the WPF package.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-windows10.0.19041 is compatible. |
-
net10.0-windows10.0.19041
- MatPlotLibNet.Skia (= 1.32.0)
- SkiaSharp.Views.WindowsForms (>= 3.119.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.32.0 | 55 | 12/3/2026 |
MatPlotLibNet 1.32.0. What changed in this release, and in every release before it, is written out in the changelog: https://github.com/xkqg/MatPlotLibNet/blob/main/CHANGELOG.md#1320