Library / SDK
alandefreitas/matplotplusplus avatar
alandefreitas/matplotplusplus

Matplot++ is a C++ graphics library for data visualization

Matplot++: A C++ Graphics Library for Data Visualization 📊🗾

4,947 stars386 forksC++MIT

At a glance

What is it?
Matplot++ is a C++ graphics library for data visualization that offers interactive plotting, publication quality export, a compact syntax, dozens of plot types, multiple coding styles, and generic backends.
Who is it for?
Matplot++ is a C++ graphics library for data visualization that brings interactive plotting, publication-quality export, a compact syntax, dozens of plot categories, multiple coding styles, and generic backends to scientific and general C++ code. It covers line, distribution, discrete, geographic, polar, contour, vector, surface, graph, and image plots, and it slots into a build through package managers or CMake.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 7 months ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • alandefreitas/matplotplusplus4,947 ★ · +16
Star history
Repository2026-09-232026-11-15
alandefreitas/matplotplusplus4.9k4.9k

16 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What Matplot++ is for

Data visualization helps programmers and scientists spot trends in their data and share those results with peers. Modern C++ is used for a growing range of scientific work, and that environment benefits from graphics libraries built around the usual goals of scientific visualization. The customary choices in C++ are either non-dedicated libraries that depend on an existing user interface or bindings to another language.

Matplot++ is a graphics library for data visualization. Its README says it provides interactive plotting, a way to export plots in high-quality formats for scientific publications, a compact syntax that stays consistent with similar libraries, dozens of plot categories backed by specialized algorithms, multiple coding styles, and support for generic backends.

The plot categories it covers

Matplot++ organizes its plot types into a long list of families. The line plot family includes basic line plots, 3D line plots, stairs, error bars, area plots, loglog plots, function plots, and implicit functions.

The data distribution family covers histograms, boxplots, scatter plots, 3D scatter plots, binned scatter plots, plot matrices, parallel coordinates, pie charts, heatmaps, and word clouds. Discrete data gets bar plots, Pareto charts, and stem plots in both 2D and 3D. Geography adds geoplot, geoscatter, geobubble, and geodensity plots. Polar plots cover polar line, polar scatter, and polar histogram variants, while the remaining families include contour plots, vector fields, surfaces, graphs, and images.

Annotations and appearance control

Beyond the data itself, Matplot++ offers a set of annotation primitives. These include text, text with an arrow, rectangles, filled polygons, ellipses, textboxes, arrows, and lines, which let you mark up a plot without leaving the library.

For appearance, the README lists controls for labels, axes, grids, multiplot layouts, colormaps, the camera, the figure object, line specs, the axes object, and clearing axes. Together these give you the usual knobs for making a figure readable and consistent across a publication.

Multiple coding styles

One of the stated features is support for multiple coding styles. The documentation organizes this around member versus free-standing functions, reactive versus quiet figures, method chaining, ranges, common utilities, backends, and the motivation behind the design.

This range means you can write the same plot in the style that fits your codebase, whether you prefer calling functions on a figure object or chaining a sequence of operations. The compact syntax is meant to stay familiar to people who have used similar plotting libraries elsewhere.

Integrating Matplot++ into a project

Matplot++ can be pulled into a project through package managers or through CMake. The README lays out integration under headings for Package Managers, CMake, and Install.

Exporting and backends

The library is built to export plots, and the documentation splits this into saving manually and saving programmatically. Because the aim is scientific publication, the export path is treated as a first-class part of the library rather than an afterthought.

Matplot++ also supports generic backends. The README mentions this as one of the core capabilities alongside interactive plotting and the compact syntax, which means the rendering layer is not hard-wired to a single windowing or drawing system.

Documentation and community

Matplot++ points new users to a documentation site for a quick start and examples, and it gathers community activity in discussions. The gallery gives a visual tour of the plot categories, so you can see the output before reading the API.

Because the library spans so many plot families and coding styles, the documentation is the place to confirm the exact call for a given chart. The project presents itself as a general-purpose C++ plotting tool rather than a niche renderer.

Editorial conclusion

Matplot++ is a C++ graphics library for data visualization that brings interactive plotting, publication-quality export, a compact syntax, dozens of plot categories, multiple coding styles, and generic backends to scientific and general C++ code. It covers line, distribution, discrete, geographic, polar, contour, vector, surface, graph, and image plots, and it slots into a build through package managers or CMake. For C++ developers who want charts without leaving the language or binding to another runtime, it is a self-contained option.

Frequently asked questions

What is a good plot library for C++?

Matplot++ is one option. Its README describes it as a C++ graphics library for data visualization that provides interactive plotting, export to high-quality formats for scientific publications, a compact syntax, dozens of plot categories, multiple coding styles, and generic backends.

Which plot types does Matplot++ provide?

The README groups its plots into line plots, data distribution, discrete data, geography, polar plots, contour plots, vector fields, surfaces, graphs, and images. Each family contains several specific chart kinds, such as histograms, scatter plots, bar plots, and heatmaps.

Can Matplot++ export plots for publications?

Yes. The README states that Matplot++ offers a means for exporting plots in high-quality formats intended for scientific publications, and it documents both manual and programmatic saving.

Official sources

  1. alandefreitas/matplotplusplus on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases

Was this useful?