MatPlotLibNet.Web 1.32.0

dotnet add package MatPlotLibNet.Web --version 1.32.0
                    
NuGet\Install-Package MatPlotLibNet.Web -Version 1.32.0
                    
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="MatPlotLibNet.Web" Version="1.32.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MatPlotLibNet.Web" Version="1.32.0" />
                    
Directory.Packages.props
<PackageReference Include="MatPlotLibNet.Web" />
                    
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 MatPlotLibNet.Web --version 1.32.0
                    
#r "nuget: MatPlotLibNet.Web, 1.32.0"
                    
#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 MatPlotLibNet.Web@1.32.0
                    
#: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=MatPlotLibNet.Web&version=1.32.0
                    
Install as a Cake Addin
#tool nuget:?package=MatPlotLibNet.Web&version=1.32.0
                    
Install as a Cake Tool

MatPlotLibNet.Web

One package for a web app that shows charts. It holds no code of its own; it brings the three packages a Blazor or ASP.NET Core app needs, at one version, so you add one line instead of three and the versions cannot drift apart:

  • MatPlotLibNet, the charting core;
  • MatPlotLibNet.AspNetCore, the SignalR hub and the REST endpoints;
  • MatPlotLibNet.Blazor, <MplChart> and <MplLiveChart>.

Start a web app with a chart

1. Add the package.

dotnet add package MatPlotLibNet.Web

2. Register the server side and map the hub. This is what lets a chart reach every viewer that has it open. In Program.cs:

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddMatPlotLibNetSignalR();

var app = builder.Build();

app.MapChartHub();

app.Run();

3. Put a chart on a page. In a Blazor app, add @using MatPlotLibNet, @using MatPlotLibNet.Blazor and @using MatPlotLibNet.Models to _Imports.razor, then:

@page "/"

<MplChart Figure="@_figure" CssClass="my-chart" />

@code {
    private readonly Figure _figure = Plt.Create()
        .WithTitle("Squares")
        .Plot([0.0, 1, 2, 3, 4, 5, 6], [0.0, 1, 4, 9, 16, 25, 36])
        .Build();
}

Run it and the page shows the squares of 0 to 6 as a line:

A line chart titled Squares, climbing from 0 at the left to 36 at the right

To change that chart for every viewer while the page is open, use <MplLiveChart> and publish a new picture; the AspNetCore page and the Blazor page show how.

What is not in it

PNG, PDF and GIF are not in it. MatPlotLibNet.Skia writes them, and once it is loaded the library's text is drawn as outlines, so a project that wants those formats adds MatPlotLibNet.Skia itself. A React, Vue or Angular front end takes the npm package of its framework, which this package does not carry.

See the package map for what each of the packages does.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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 56 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