stisa / matplotplusplus

Matplot++: A C++ Graphics Library for Data Visualization πŸ“ŠπŸ—Ύ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Matplot++

Data visualization can help programmers and scientists identify trends in their data and efficiently communicate these results with their peers. Modern C++ is being used for a variety of scientific applications, and this environment can benefit considerably from graphics libraries that attend the typical design goals toward scientific data visualization. Besides the option of exporting results to other environments, the customary alternatives in C++ are either non-dedicated libraries that depend on existing user interfaces or bindings to other languages. Matplot++ is a graphics library for data visualization that provides interactive plotting, means for exporting plots in high-quality formats for scientific publications, a compact syntax consistent with similar libraries, dozens of plot categories with specialized algorithms, multiple coding styles, and supports generic backends.

Gallery

example_plot_1 example_plot_2 example_plot_3 example_plot_4 example_plot_5 example_plot_6 example_plot_7 example_plot_8 example_plot_9 example_plot_10 example_plot_11 example_plot_12 example_plot3_1 example_plot3_2 example_plot3_3 example_plot3_4 example_plot3_5 example_plot3_6 example_plot3_7 example_plot3_8 example_plot3_9 example_plot3_10 example_stairs_1 example_stairs_2 example_stairs_3 example_stairs_4 example_stairs_5 example_stairs_6 example_stairs_7 example_stairs_8 example_stairs_9 example_stairs_10 example_errorbar_1 example_errorbar_2 example_errorbar_3 example_errorbar_4 example_errorbar_5 example_errorbar_6 example_errorbar_7 example_errorbar_8 example_errorbar_9 example_errorbar_10 example_area_1 example_area_2 example_area_3 example_area_4 example_loglog_1 example_loglog_2 example_loglog_3 example_loglog_4 example_loglog_5 example_loglog_6 example_loglog_7 example_loglog_8 example_loglog_9 example_semilogx_1 example_semilogy_1 example_fplot_1 example_fplot_2 example_fplot_3 example_fplot_4 example_fplot_5 example_fplot_6 example_fplot3_1 example_fplot3_2 example_fplot3_3 example_fplot3_4 example_fplot3_5 example_fimplicit_1 example_fimplicit_2 example_fimplicit_3 example_fimplicit_4 example_histogram_1 example_histogram_2 example_histogram_3 example_histogram_4 example_histogram_5 example_histogram_6 example_histogram_7 example_histogram_8 example_histogram_9 example_histogram_10 example_histogram_11 example_histogram_12 example_histogram_14 example_boxplot_1 example_boxplot_2 example_boxplot_3 example_scatter_1 example_scatter_2 example_scatter_3 example_scatter_4 example_scatter_5 example_scatter_6 example_scatter_7 example_scatter_8 example_scatter3_1 example_scatter3_2 example_scatter3_3 example_scatter3_4 example_scatter3_5 example_scatter3_6 example_binscatter_1 example_binscatter_2 example_binscatter_3 example_binscatter_4 example_binscatter_5 example_binscatter_6 example_binscatter_7 example_plotmatrix_1 example_plotmatrix_2 example_plotmatrix_3 example_plotmatrix_4 example_parallelplot_1 example_parallelplot_2 example_parallelplot_3 example_pie_1 example_pie_2 example_pie_3 example_pie_4 example_pie_5 example_pie_6 example_heatmap_1 example_heatmap_2 example_heatmap_3 example_heatmap_4 example_heatmap_5 example_heatmap_6 example_heatmap_7 example_wordcloud_1 example_wordcloud_3 example_wordcloud_4 example_wordcloud_4 example_bar_1 example_bar_2 example_bar_3 example_bar_4 example_bar_5 example_bar_6 example_bar_7 example_bar_8 example_bar_9 example_bar_10 example_bar_11 example_bar_12 example_bar_13 example_pareto_1 example_pareto_2 example_pareto_3 example_pareto_4 example_stem_1 example_stem_2 example_stem_3 example_stem_4 example_stem_5 example_stem_6 example_stem_7 example_stem_8 example_stem_9 example_stem3_1 example_stem3_2 example_stem3_3 example_stem3_4 example_stem3_5 example_stem3_6 example_stem3_7 example_stem3_8 example_stem3_9 example_stem3_10 example_stem3_11 example_geoplot_1 example_geoplot_2 example_geoplot_3 example_geoplot_4 example_geoplot_5 example_geoplot_6 example_geoplot_7 example_geoscatter_1 example_geoscatter_2 example_geobubble_1 example_geobubble_2 example_geodensityplot_1 example_polarplot_1 example_polarplot_2 example_polarplot_3 example_polarplot_4 example_polarplot_5 example_polarplot_6 example_polarplot_7 example_polarplot_8 example_polarscatter_1 example_polarscatter_2 example_polarscatter_3 example_polarscatter_4 example_polarscatter_5 example_polarscatter_6 example_polarhistogram_1 example_polarhistogram_2 example_polarhistogram_3 example_polarhistogram_4 example_polarhistogram_5 example_compass_1 example_compass_2 example_ezpolar_1 example_ezpolar_2 example_contour_1 example_contour_2 example_contour_3 example_contour_4 example_contour_5 example_contour_6 example_contour_7 example_contour_8 example_contourf_1 example_contourf_2 example_contourf_3 example_contourf_4 example_contourf_5 example_contourf_6 example_fcontour_1 example_fcontour_2 example_fcontour_3 example_fcontour_4 example_fcontour_5 example_fcontour_6 example_fcontour_7 example_fcontour_8 example_fcontour_9 example_fcontour_10 example_fcontour_11 example_feather_1 example_quiver_1 example_quiver_2 example_quiver_3 example_quiver_4 example_quiver_5 example_quiver3_1 example_surf_1 example_surf_2 example_surf_3 example_surf_4 example_surf_5 example_surf_6 example_surfc_1 example_surfc_2 example_surfc_3 example_surfc_4 example_mesh_1 example_mesh_2 example_mesh_3 example_mesh_4 example_meshc_1 example_meshc_2 example_meshc_3 example_meshz_1 example_meshz_2 example_meshz_3 example_fsurf_1 example_fsurf_2 example_fsurf_3 example_fsurf_4 example_fsurf_5 example_fsurf_6 example_fsurf_7 example_fsurf_8 example_fmesh_1 example_fmesh_2 example_fmesh_3 example_fmesh_4 example_waterfall_1 example_waterfall_2 example_waterfall_3 example_fence_1 example_fence_2 example_fence_3 example_ribbon_1 example_ribbon_2 example_ribbon_3 example_ribbon_4 example_graph_1 example_graph_2 example_graph_3 example_graph_4 example_graph_5 example_graph_6 example_digraph_1 example_digraph_2 example_digraph_3 example_imshow_1 example_imshow_2 example_imshow_3 example_imshow_4 example_imshow_5 example_imshow_6 example_imshow_7 example_imshow_8 example_imshow_9 example_imshow_10 example_imshow_11 example_image_1 example_image_2 example_image_3 example_image_4 example_image_5 example_imagesc_1 example_imagesc_2 example_imagesc_3 example_imagesc_4 example_text_1 example_text_2 example_text_3 example_text_4 example_text_5 example_text_6 example_text_7 example_text_8 example_textarrow_1 example_textarrow_2 example_rectangle_1 example_rectangle_2 example_rectangle_3 example_rectangle_4 example_rectangle_5 example_fill_1 example_ellipse_1 example_textbox_1 example_arrow_1 example_arrow_2 example_line_1 example_title_1 example_title_2 example_title_3 example_title_4 example_title_5 example_title_6 example_title_7 example_title_8 example_sgtitle_1 example_sgtitle_2 example_xlabel_1 example_xlabel_2 example_xlabel_3 example_xlabel_4 example_xlabel_5 example_xlabel_6 example_xlabel_7 example_xlabel_8 example_ylabel_1 example_ylabel_2 example_ylabel_3 example_ylabel_4 example_ylabel_5 example_ylabel_6 example_ylabel_7 example_ylabel_8 example_zlabel_1 example_zlabel_2 example_zlabel_3 example_legend_1 example_legend_2 example_legend_3 example_legend_4 example_legend_5 example_legend_6 example_legend_7 example_legend_8 example_legend_9 example_xlim_1 example_xlim_2 example_xlim_3 example_xlim_4 example_xlim_5 example_xlim_6 example_ylim_1 example_ylim_2 example_ylim_3 example_ylim_4 example_ylim_5 example_ylim_6 example_zlim_1 example_zlim_2 example_zlim_3 example_zlim_4 example_zlim_5 example_zlim_6 example_axis_1 example_axis_2 example_axis_3 example_axis_4 example_axis_5 example_axis_6 example_axis_7 example_axis_8 example_box_1 example_box_2 example_box_3 example_grid_1 example_grid_2 example_grid_3 example_grid_4 example_xticks_1 example_xticks_2 example_xticks_3 example_xticks_4 example_xticks_5 example_xticks_6 example_xticks_7 example_xticks_8 example_yticks_1 example_yticks_2 example_yticks_3 example_yticks_4 example_yticks_5 example_yticks_6 example_yticks_7 example_yticks_8 example_zticks_1 example_zticks_2 example_zticks_3 example_zticks_4 example_zticks_5 example_zticks_6 example_xticklabels_1 example_xticklabels_2 example_xticklabels_3 example_xticklabels_4 example_yticklabels_1 example_yticklabels_2 example_yticklabels_3 example_yticklabels_4 example_xtickformat_1 example_xtickformat_2 example_xtickformat_3 example_xtickformat_4 example_xtickformat_5 example_ytickformat_1 example_ytickformat_2 example_ytickformat_3 example_ytickformat_4 example_ytickformat_5 example_ztickformat_1 example_ztickformat_2 example_ztickformat_3 example_ztickformat_4 example_ztickformat_5 example_xtickangle_1 example_xtickangle_2 example_xtickangle_3 example_ytickangle_1 example_ytickangle_2 example_ytickangle_3 example_hold_1 example_hold_2 example_hold_3 example_hold_4 example_yyaxis_1 example_yyaxis_2 example_yyaxis_3 example_yyaxis_4 example_yyaxis_5 example_yyaxis_6 example_yyaxis_7 example_colororder_1 example_colororder_2 example_colororder_3 example_colororder_4 example_colororder_5 example_colororder_6 example_colororder_7 example_subplot_1 example_subplot_2 example_subplot_3 example_subplot_4 example_subplot_5 example_subplot_6 example_subplot_7 example_subplot_8 example_subplot_9 example_subplot_10 example_subplot_11 example_subplot_12 example_subplot_13 example_tiledlayout_1 example_tiledlayout_2 example_tiledlayout_3 example_tiledlayout_4 example_tiledlayout_5 example_tiledlayout_6 example_tiledlayout_7 example_tiledlayout_8 example_colormap_1 example_colormap_2 example_colormap_3 example_colormap_4 example_colormap_5 example_colormap_6 example_colormap_7 example_colormap_8 example_colormap_9 example_colorbar_1 example_colorbar_2 example_colorbar_3 example_colorbar_4 example_colorbar_5 example_colorbar_6 example_colorbar_7 example_rgbplot_1 example_rgbplot_2 example_view_1 example_view_2 example_view_3 example_view_4 example_view_5 example_view_6 example_lighting_1 example_lighting_2 example_lighting_3 example_lighting_4 example_lighting_5 example_lighting_6 example_figure_1 example_figure_2 example_figure_3 example_line_spec_1 example_axes_1 example_axes_2 example_axes_3 example_axes_4 example_cla_1 example_cla_2 example_cla_3 example_save_1 example_save_2 example_save_3 example_save_4 example_save_5 example_save_6 example_save_7 example_save_8

Examples

The examples assume we are in the matplot namespace. Use these examples to understand how to quickly use the library for data visualization. If you are interested in understanding how the library works, you can later read the details in the complete article.

Line Plots

Line Plot

plot(x,y); 

example_plot_1

Where x and y are are any value ranges.

More examples:

example_plot_2 example_plot_3 example_plot_4 example_plot_5 example_plot_6 example_plot_7 example_plot_8 example_plot_9 example_plot_10 example_plot_11 example_plot_12

Setters return a reference to *this to allow method chaining:

plot(x,y)->line_width(2).color("red");

The examples use free-standing functions to create plots. You can also use a object-oriented style for plots. We discuss these coding styles in the Section Coding Styles.

Line Plot 3D

plot3(x,y);

example_plot3_1

More examples:

example_plot3_2 example_plot3_3 example_plot3_4 example_plot3_5 example_plot3_7 example_plot3_8 example_plot3_9 example_plot3_10

With method chaining:

plot3(x,y)->line_width(2).color("red");

Stairs

stairs(x,y);

example_stairs_1

More examples:

example_stairs_2 example_stairs_3 example_stairs_4 example_stairs_5 example_stairs_6 example_stairs_7 example_stairs_8 example_stairs_9 example_stairs_10

The stair object renders the line with stairs between data points to denote discrete data.

Error Bars

errorbar(x,y,err);

example_errorbar_1

More examples:

example_errorbar_2 example_errorbar_3 example_errorbar_4 example_errorbar_5 example_errorbar_6 example_errorbar_7 example_errorbar_8 example_errorbar_9 example_errorbar_10

The error bar object includes extra lines to represent error around data points. Log plots are utility functions that adjust the x or y axes to a logarithmic scale.

Area

area(Y);

example_area_1

More examples:

example_area_2 example_area_3 example_area_4

Loglog Plot

loglog(x,y);

example_loglog_1

More examples:

example_loglog_2 example_loglog_3 example_loglog_4 example_loglog_5 example_loglog_6 example_loglog_7 example_loglog_8 example_loglog_9

Semilogx Plot

semilogx(x,y);

example_semilogx_1

Semilogy Plot

semilogy(x,y);

example_semilogy_1

Function Plot

fplot(fx);

example_fplot_1

More examples:

example_fplot_2 example_fplot_3 example_fplot_4 example_fplot_5 example_fplot_6

Instead of storing data points, the objects function line and string function store a function as a lambda function or as a string with an expression. These objects use lazy evaluation to generate absolute data points. The data is generated only when the draw function is called.

Function Plot 3D

fplot(fxy);

example_fplot3_1

More examples:

example_fplot3_2 example_fplot3_3 example_fplot3_4 example_fplot3_5

Implicit function

fplot(fxy);

example_fimplicit_1

More examples:

example_fimplicit_2 example_fimplicit_3 example_fimplicit_4

Data Distribution

Histogram

hist(data);

example_histogram_1

More examples:

example_histogram_2 example_histogram_3 example_histogram_4 example_histogram_5 example_histogram_6 example_histogram_7 example_histogram_8 example_histogram_9 example_histogram_10 example_histogram_11 example_histogram_12 example_histogram_14

The histogram object creates the histogram edges and bins when the draw function is called for the first time with lazy evaluation. Lazy evaluation avoids calculating edges unnecessarily in case the user changes the object parameters before calling draw. This object includes several algorithms for automatically delimiting the edges and bins for the histograms.

Boxplot

boxplot(data);

example_boxplot_1

More examples:

example_boxplot_2 example_boxplot_3

Scatter Plot

scatter(x,y);

example_scatter_1

More examples:

example_scatter_2 example_scatter_3 example_scatter_4 example_scatter_5 example_scatter_6 example_scatter_7 example_scatter_8

Scatter plots also depend on the line object. As the line object can represent lines with markers, the scatter function simply creates markers without the lines.

Scatter Plot 3D

scatter(x,y,z);

example_scatter3_1

More examples:

example_scatter3_2 example_scatter3_3 example_scatter3_4 example_scatter3_5 example_scatter3_6

Binned Scatter Plots

binscatter(x,y);

example_binscatter_1

More examples:

example_binscatter_2 example_binscatter_3 example_binscatter_4 example_binscatter_5 example_binscatter_6 example_binscatter_7

Binned scatter plots use variations of the histogram algorithms of the previous section as an extra step to place all the data into two-dimensional bins that can be represented with varying colors or sizes. This is useful when there are so many data points that a scatter plot would be impractical for visualizing the data.

Plot Matrix

plotmatrix(X);

example_plotmatrix_1

More examples:

example_plotmatrix_2 example_plotmatrix_3 example_plotmatrix_4

The Plot Matrix subcategory is a combination of histograms and scatter plots. It creates a matrix of axes objects on the figure and creates a scatter plot for each pair of data sets.

Parallel Coordinates

example_parallelplot_1

More examples:

example_parallelplot_2 example_parallelplot_3

The function parallelplot creates a plot with Parallel Coordinates. In this type of plot, a parallel lines object stores an arbitrary set of axis objects to represent multi-dimensional data.

Pie Chart

example_pie_1

More examples:

example_pie_2 example_pie_3 example_pie_4 example_pie_5 example_pie_6

Heatmap

example_heatmap_1

More examples:

example_heatmap_2 example_heatmap_3 example_heatmap_4 example_heatmap_5 example_heatmap_6 example_heatmap_7

Word Cloud

example_wordcloud_1

More examples:

example_wordcloud_3 example_wordcloud_4 example_wordcloud_4

Word clouds are generated from text or pairs of words and their frequency. After attributing a size proportional to each word frequency, the algorithm to position the labels iterates words from the largest to the smallest. For each word, it spins the word in polar coordinates converted to Cartesian coordinates until it does not overlap with any other word.

By default, the colors and the sizes depend on the word frequencies. We can customize the colors by passing a third parameter to the wordcloud function.

Discrete Data

Bar Plot

example_bar_1

More examples:

example_bar_2 example_bar_3 example_bar_4 example_bar_5 example_bar_6 example_bar_7 example_bar_8 example_bar_9 example_bar_10 example_bar_11 example_bar_12 example_bar_13

Pareto Chart

example_pareto_1

More examples:

example_pareto_2 example_pareto_3 example_pareto_4

Pareto Charts are a type of chart that uses both $y$ axes. The $y_1$ axis is used to represent bars with the data values in descending order. The $y_2$ axis is used to represent the cumulative distribution function of the data in the $y_1$ axis. By default, a Pareto Chart includes up to 10 items or as many items as needed to represent 95% of the cumulative distribution.

If you need Pareto fronts rather than Pareto charts, we refer to Scatter Plots for two-dimensional fronts, Plot matrices for three-dimensional fronts, or Parallel Coordinate Plots for many-objective fronts. These plot subcategories are described in Section Data Distribution. If you also need a tool to calculate these fronts efficiently, we refer to the Pareto Front Library.

Stem Plot

example_stem_1

More examples:

example_stem_2 example_stem_3 example_stem_4 example_stem_5 example_stem_6 example_stem_7 example_stem_8 example_stem_9

Stem Plot 3D

example_stem3_1

More examples:

example_stem3_2 example_stem3_3 example_stem3_4 example_stem3_5 example_stem3_6 example_stem3_7 example_stem3_8 example_stem3_9 example_stem3_10 example_stem3_11

Geography

Geoplot

example_geoplot_1

More examples:

example_geoplot_2 example_geoplot_3 example_geoplot_4 example_geoplot_5 example_geoplot_6 example_geoplot_7

For the first geography plot, Matplot++ calls geoplot(), which creates a filled polygon with the world map. This first plot receives the tag "map" so that subsequent geography plots recognize there is no need to recreate this world map.

The data for the world map comes from Natural Earth. They provide data at 1:10m, 1:50m, and 1:110m scales. The geoplot function will initially use the data at the 1:110m scales. The geolimits function can be used to update the axis limits for geography plots. The difference between the usual functions for adjusting axis limits (xlim and ylim) and geolimits is that the latter will also update the map resolution according to the new limits for the $x$ and $y$ axis.

The geolimits function will query the figure size and, depending on the new limits for the axes, update the map to the 1:10m, or 1:50m scales if needed. Because it would be very inefficient to render the whole world map at a 1:10m or 1:50m scale only to display a region of this map, the geolimits function also crops the data pertinent to the new region being displayed.

Note that this does not only involve removing data points outside the new limits but it also needs to create new data points on the correct borders to create new polygons coherent with the map entry points in the region. For this reason, the algorithm needs to track all submaps represented as closed polygons in the original world map. If submaps are completely inside or outside the new ranges, we can respectively include or dismiss the data points. However, if the submap is only partially inside the new limits, to generate the correct borders for the polygons, we need to track all points outside the limits to classify the directions of these points outside the limits. We do that by only including points that change quadrants around the new limits so that the map entry points create polygons that look like they would if the complete world map were still being rendered outside these new limits.

If the you are not interested in geographic plots, the build script includes an option to remove the high-resolution maps at 1:10m and 1:50m scales from the library. In this case, the library will always use the map at a 1:110m scale no matter the axis limits.

The function world_cities returns a list of major world cities. Its parameters define the minimum distances between cities in the $x$ and $y$ axes. The greedy_tsp function is a naive greedy algorithm to find a route between these cities as a Traveling Salesman Problem (TSP). We use the geoplot function to draw this route. Note that we use method chaining to define some further plot properties. Finally, the text function includes the city names in the map.

Geoscatter Plot

example_geoscatter_1

More examples:

example_geoscatter_2

Geobubble

example_geobubble_1

More examples:

example_geobubble_2

Geodensity Plot

example_geodensityplot_1

Polar Plots

Polar Line Plot

example_polarplot_1

More examples:

example_polarplot_2 example_polarplot_3 example_polarplot_4 example_polarplot_5 example_polarplot_6 example_polarplot_7 example_polarplot_8

By emplacing a polar plot in the axes, the axes move to a polar mode, where we use the $r$ and $t$ axis instead of the $x$ and $y$ axis.

From the backend point of view, these axes are an abstraction to the user. The data points in the $r$ and $t$ axis are drawn by converting the positions from the polar coordinates $r$ and $t$ to the Cartesian coordinates $x$ and $y$ with the relationships $x=r \cos{t}$ and $y=r \sin{t}$.

Aside from this conversion, these plot subcategories are analogous to line plots, scatter plots, histograms, quiver plots, and line functions.

Polar Scatter Plot

example_polarscatter_1

More examples:

example_polarscatter_2 example_polarscatter_3 example_polarscatter_4 example_polarscatter_5 example_polarscatter_6

Polar Histogram

example_polarhistogram_1

More examples:

example_polarhistogram_2 example_polarhistogram_3 example_polarhistogram_4 example_polarhistogram_5

The function polarhistogram distributes the data into the number of bins provided as its second parameter.

Compass

example_compass_1

More examples:

example_compass_2

Polar Function

example_ezpolar_1

More examples:

example_ezpolar_2

Contour Plots

Contour

example_contour_1

More examples:

example_contour_2 example_contour_3 example_contour_4 example_contour_5 example_contour_6 example_contour_7 example_contour_8

All these subcategories depend on the contours type. They also depend on lazy evaluation for generating the contour lines. When the function draw is called in the contours class, it preprocesses all contour lines for a three-dimensional function.

Although it is relatively simple to show a heatmap with the values for the $z$-axis, calculating contour lines relative to the $z$-axis is more complex than it might seem at first. We provide the function contourc for calculating contour lines. This function uses an adaptation of the algorithm adopted by Matplotlib.

The algorithm creates a quad grid defined by the $x$ and $y$ values. It uses this grid to infer a contour line passing through positions with the same $z$ value. The algorithm sweeps through the grid twice to generate these lines. The first sweep looks for lines that start on the boundaries. The second sweep looks for interior closed loops.

Filled contours are closed polygons for pairs of contour levels. Some polygons for filled contours might be holes inside other polygons. The algorithm needs to keep track of these relationships so that we can render the polygons in their accurate order. To avoid an extra step that identifies this relationship between the polygons, the sweeping algorithm already identifies which polygons are holes for each level.

Once we find the quads with the contour line, the line is generated by interpolating the $z$ values around that quad.

Filled Contour

example_contourf_1

More examples:

example_contourf_2 example_contourf_3 example_contourf_4 example_contourf_5 example_contourf_6

Function Contour

example_fcontour_1

More examples:

example_fcontour_2 example_fcontour_3 example_fcontour_4 example_fcontour_5 example_fcontour_6 example_fcontour_7 example_fcontour_8 example_fcontour_9 example_fcontour_10 example_fcontour_11

By default, the function fcontour will generate 9 contour lines from a lambda function. The functions contour and contourf, on the other hand, plot contour lines and filled contour lines from a grid of data points for $x$, $y$, and $z$.

Vector Fields

Quiver

example_quiver_1

More examples:

example_quiver_2 example_quiver_3 example_quiver_4

All these subcategories depend on the vectors object type. In a two-dimensional plot, for each value of $x$ and $y$ with the position of a vector, it also requires the value of $u$ and $v$ indicating its direction and magnitude. In a three-dimensional plot, the direction and magnitude are defined by $u$, $v$, and $w$.

A quiver plot (or velocity plot) shows a grid of vectors whose direction and magnitude are scaled to prevent the overlap between vectors in subsequent quads.

Quiver 3D

example_quiver3_1

Feather

example_feather_1

Surfaces

Surface

example_surf_1

More examples:

example_surf_2 example_surf_3 example_surf_4 example_surf_5 example_surf_6

Surface with Contour

example_surfc_1

More examples:

example_surfc_2 example_surfc_3 example_surfc_4

Mesh

example_mesh_1

More examples:

example_mesh_2 example_mesh_3 example_mesh_4

Mesh with Contour

example_meshc_1

More examples:

example_meshc_2 example_meshc_3

Mesh with Curtain

example_meshz_1

More examples:

example_meshz_2 example_meshz_3

Function Surface

example_fsurf_1

More examples:

example_fsurf_2 example_fsurf_3 example_fsurf_4 example_fsurf_5 example_fsurf_6 example_fsurf_7 example_fsurf_8

Function Mesh

example_fmesh_1

More examples:

example_fmesh_2 example_fmesh_3 example_fmesh_4

Waterfall

example_waterfall_1

More examples:

example_waterfall_2 example_waterfall_3

Fence

example_fence_1

More examples:

example_fence_2 example_fence_3

Ribbon

example_ribbon_1

More examples:

example_ribbon_2 example_ribbon_3 example_ribbon_4

Graphs

Undirected Graph

example_graph_1

More examples:

example_graph_2 example_graph_3 example_graph_4 example_graph_5

All these subcategories depend on the network class. Graphs are abstract structures that represent objects and relationships between these objects. The objects are represented as vertices and the relationships are depicted as edges.

In an abstract graph, the vertices have no specific position in space. Mathematically, a graph does not depend on its layout. However, the graph layout has a large impact on its understandability. The network class can calculate appropriate positions for graph vertices with several algorithms: Kamada Kawai algorithm, Fruchterman-Reingold algorithm, circle layout, random layout, and automatic layout.

The implementation of the Kamada Kawai and Fruchterman-Reingold algorithms depend on the NodeSoup library. The automatic layout uses the Kamada Kawai algorithm for small graphs and the Fruchterman-Reingold algorithm for larger graphs.

Directed Graph

example_digraph_1

More examples:

example_digraph_2 example_digraph_3

Images

Image Show

example_imshow_1

More examples:

example_imshow_2 example_imshow_3 example_imshow_4 example_imshow_5 example_imshow_6 example_imshow_7 example_imshow_8 example_imshow_9 example_imshow_10 example_imshow_11

These subcategories depend on the matrix class. The matrix class can have up to four matrices. If it has only one matrix, it is represented with a colormap. If it has three matrices, they represent the red, green, and blue channels. If it has four matrices, the fourth matrix represents an alpha channel to control the transparency of each pixel.

We use the CImg library to load and save images. CImg can handle many common image formats as long as it has access to the appropriate libraries. The Matplot++ build script will look at compile-time for the following optional libraries: JPEG, TIFF, ZLIB, PNG, LAPACK, BLAS, OpenCV, X11, fftw3, OpenEXR, and Magick++. The build script will attempt to link all libraries from this list to Matplot++.

Matplot++ includes a few convenience functions to manipulate matrices with images: imread, rgb2gray, gray2rgb, imresize, and imwrite. All these functions work with lists of matrices.

Image Matrix

example_image_1

More examples:

example_image_2 example_image_3 example_image_4 example_image_5

Scaled Image

example_imagesc_1

More examples:

example_imagesc_2 example_imagesc_3 example_imagesc_4

Annotations

The annotations category is meant to create individual objects on the plot rather than representations of data sets. An important difference between the annotations category and other categories is that, by default, the annotations do not replace the plot that already exists in the axes object, even if the user does not call the hold function.

Text

example_text_1

More examples:

example_text_2 example_text_3 example_text_4 example_text_5 example_text_6 example_text_7 example_text_8

Text with Arrow

example_textarrow_1

More examples:

example_textarrow_2

Rectangle

example_rectangle_1

More examples:

example_rectangle_2 example_rectangle_3 example_rectangle_4 example_rectangle_5

The rectangle object can have a border curvature from $0$ to $1$. We can also annotate with text, arrows, polygons, and lines.

Filled Polygon

example_fill_1

Ellipse

example_ellipse_1

Textbox

example_textbox_1

Arrow

example_arrow_1

More examples:

example_arrow_2

Line

example_line_1

Appearance

As a convenience, the colors.h header contains many functions to generate colors from strings and vice-versa.

Labels

Title

example_title_1

More examples:

example_title_2 example_title_3 example_title_4 example_title_5 example_title_6 example_title_7 example_title_8

Subplot Title

example_sgtitle_1

More examples:

example_sgtitle_2

X Label

example_xlabel_1

More examples:

example_xlabel_2 example_xlabel_3 example_xlabel_4 example_xlabel_5 example_xlabel_6 example_xlabel_7 example_xlabel_8

Y Label

example_ylabel_1

More examples:

example_ylabel_2 example_ylabel_3 example_ylabel_4 example_ylabel_5 example_ylabel_6 example_ylabel_7 example_ylabel_8

Z Label

example_zlabel_1

More examples:

example_zlabel_2 example_zlabel_3

Legend

example_legend_1

More examples:

example_legend_2 example_legend_3 example_legend_4 example_legend_5 example_legend_6 example_legend_7 example_legend_8

Axis

X Limits

example_xlim_1

More examples:

example_xlim_2 example_xlim_3 example_xlim_4 example_xlim_5 example_xlim_6

Y Limits

example_ylim_1

More examples:

example_ylim_2 example_ylim_3 example_ylim_4 example_ylim_5 example_ylim_6

Z Limits

example_zlim_1

More examples:

example_zlim_2 example_zlim_3 example_zlim_4 example_zlim_5 example_zlim_6

Adjust Axis

example_axis_1

More examples:

example_axis_2 example_axis_3 example_axis_4 example_axis_5 example_axis_6 example_axis_7 example_axis_8

Box

example_box_1

More examples:

example_box_2 example_box_3

Grid

Grid

example_grid_1

More examples:

example_grid_2 example_grid_3 example_grid_4

X Ticks

example_xticks_1

More examples:

example_xticks_2 example_xticks_3 example_xticks_4 example_xticks_5 example_xticks_6 example_xticks_7 example_xticks_8

Y Ticks

example_yticks_1

More examples:

example_yticks_2 example_yticks_3 example_yticks_4 example_yticks_5 example_yticks_6 example_yticks_7 example_yticks_8

Z Ticks

example_zticks_1

More examples:

example_zticks_2 example_zticks_3 example_zticks_4 example_zticks_5 example_zticks_6

X Tick Labels

example_xticklabels_1

More examples:

example_xticklabels_2 example_xticklabels_3 example_xticklabels_4

Y Tick Labels

example_yticklabels_1

More examples:

example_yticklabels_2 example_yticklabels_3 example_yticklabels_4

X Tick Format

example_xtickformat_1

More examples:

example_xtickformat_2 example_xtickformat_3 example_xtickformat_4 example_xtickformat_5

Y Tick Format

example_ytickformat_1

More examples:

example_ytickformat_2 example_ytickformat_3 example_ytickformat_4 example_ytickformat_5

Z Tick Format

example_ztickformat_1

More examples:

example_ztickformat_2 example_ztickformat_3 example_ztickformat_4 example_ztickformat_5

X Tick Angle

example_xtickangle_1

More examples:

example_xtickangle_2 example_xtickangle_3

Y Tick Angle

example_ytickangle_1

More examples:

example_ytickangle_2 example_ytickangle_3

Multiplot

Hold

example_hold_1

More examples:

example_hold_2 example_hold_3 example_hold_4

YY-axis

example_yyaxis_1

More examples:

example_yyaxis_2 example_yyaxis_3 example_yyaxis_4 example_yyaxis_5 example_yyaxis_6

Color Order

example_colororder_1

More examples:

example_colororder_2 example_colororder_3 example_colororder_4 example_colororder_5 example_colororder_6 example_colororder_7

Subplots

Unlike other libraries, subplots uses 0-based indices.

example_subplot_1

More examples:

example_subplot_2 example_subplot_3 example_subplot_4 example_subplot_5 example_subplot_6 example_subplot_7 example_subplot_8 example_subplot_9 example_subplot_10 example_subplot_11 example_subplot_12 example_subplot_13

Tiled Layout

Our tiling functions are convenience shortcuts for the subplot functions. If there is no room for the next tile, we automatically rearrange the axes and increase the number of subplot rows or columns to fit the next tile. Use subplots for more control over the subplots.

example_tiledlayout_1

More examples:

example_tiledlayout_2 example_tiledlayout_3 example_tiledlayout_4 example_tiledlayout_5 example_tiledlayout_6 example_tiledlayout_7 example_tiledlayout_8

Colormaps

Colormap

example_colormap_1

More examples:

example_colormap_2 example_colormap_3 example_colormap_4 example_colormap_5 example_colormap_6 example_colormap_7 example_colormap_8 example_colormap_9

Color Bar

example_colorbar_1

More examples:

example_colorbar_2 example_colorbar_3 example_colorbar_4 example_colorbar_5 example_colorbar_6 example_colorbar_7

RGB Plot

example_rgbplot_1

More examples:

example_rgbplot_2

Camera

View

example_view_1

More examples:

example_view_2 example_view_3 example_view_4 example_view_5

Lighting

example_lighting_1

More examples:

example_lighting_2 example_lighting_3 example_lighting_4 example_lighting_5 example_lighting_6

Figure Object

example_figure_1

More examples:

example_figure_2 example_figure_3

Line Specs

example_line_spec_1

Axes Object

example_axes_1

More examples:

example_axes_2 example_axes_3

Clear Axes

example_cla_1

More examples:

example_cla_2 example_cla_3

Exporting

Saving (Manually)

The interactive plot window has a widget to save the current figure. Because this widget uses the same backend as the one used to produce the interactive image, the final image matches closely what the user sees in the window.

Saving (Programatically)

You can programatically save the figure in a number of formats with the save function:

save(filename);

or

save(filename, fileformat);

example_save_1

More examples:

example_save_2 example_save_3 example_save_4 example_save_5 example_save_6 example_save_7 example_save_8

The first option (save(filename)) infers the appropriate file format from the filename extension. In both cases (save(filename) and save(filename,fileformat)), this function temporarily changes the backend to a non-interactive backend appropriate to draw the figure. A different backend is used for each format and, depending on the format, the final image does not necessarily match what is on the interactive plot window. The reason is that some file formats purposefully do not include the same features.

For instance, consider the bar chart generated by

vector<double> x = {29, 17, 14, 13, 12, 4, 11};
bar(x);

If we export the image with

save("barchart.svg");

we get the vector graphics

Barchart as SVG file

Exporting the image with

save("barchart.txt");

generates a representation of the image appropriate for text or markdown files, such as


       30 +-----------------------------------------------------------+
          |    *******   +       +      +       +      +       +      |
          |    *     *                                                |
       25 |-+  *     *                                              +-|
          |    *     *                                                |
          |    *     *                                                |
       20 |-+  *     *                                              +-|
          |    *     *                                                |
          |    *     ********                                         |
       15 |-+  *     **     *                                       +-|
          |    *     **     * *******                                 |
          |    *     **     * *     ******** *******                  |
          |    *     **     * *     **     * *     *        *******   |
       10 |-+  *     **     * *     **     * *     *        *     * +-|
          |    *     **     * *     **     * *     *        *     *   |
          |    *     **     * *     **     * *     *        *     *   |
        5 |-+  *     **     * *     **     * *     ******** *     * +-|
          |    *     **     * *     **     * *     **     * *     *   |
          |    *  +  **  +  * *  +  **  +  * *  +  **  +  * *  +  *   |
        0 +-----------------------------------------------------------+
                  1      2       3      4       5      6       7

As the last example, saving an image with

save("barchart.tex");

would save the image in a format appropriate to embed in latex documents, such as

Barchart - Latex

This exports the image in a format in which the labels are replaced by latex text so that the plot fits the rest of the document.

Coding styles

Member vs. Free-standing Functions

Like in Matplotlib, we support two coding styles: Free-standing functions and an Object-oriented interface.

  • Freestanding functions:

    • We call functions to create plots on the current axes
    • The global current axes object is the current axes object in the current figure in the global figure registry
    • For instance, one can use plot(y); to create a line plot on the current axes (or create a new axes object if needed).
    • Also, one can use plot(ax,y); to create a line plot on the axes object ax.
    • This is less verbose for small projects and quick tests.
    • The library looks for existing axes to create the plot.
  • Object-oriented interface:

    • We explicitly create figures and call methods on them
    • For instance, one can use ax->plot(y); to plot on the axes object ax
    • We can create the same line plot on the current axes by auto ax = gca(); ax->plot(y);
    • This is less verbose and provides better control in large projects where we need to pass these objects around
    • The user manages axes handles containing plots.

Assuming the user is explicitly managing the axes to create plots in another function, a more complete example of these styles could be

// Free-standing functions
auto ax = gca();
plot(ax, x, y)->color("red").line_width(2);
my_function(ax);

and

// Object-oriented interface
auto ax = gca();
ax->plot(x, y)->color("red").line_width(2);
my_function(ax);

Both examples would generate the same plot. All free-standing functions are templated functions that use meta-programming to call the main function on the current axes object. If the first parameter is not an axes_handle, it will get an axes_handle from the figure registry with gca (Section Figures and Axes) and forward all parameters to the function in this axes object. If the first parameter is an axes_handle, the template function will forward all parameters, but the first one, to this axes object. This use of templates for the free-standing functions keeps both coding styles maintainable by the developers.

Note that, because the example needs the axes object for the function my_function, we also need to get a reference to the axes object with the free-standing functions. In that case, the free-standing functions are not less verbose than the object-oriented interface.

To adhere to free-standing functions, we could create two versions of my_function: one that receives an axes_handle, and a second version that would get an axes_handle from the figure registry and call the first version. If my_function is going to be exposed to other users as a library, this could be a convenience to these users. However, notice that this is only moving the verbosity from the main function to my_function. In fact, this is how the free-standing functions in Matplot++ work.

Reactive figures

There are also two modes for figures: reactive (or interactive) mode and quiet mode. Figures in reactive mode are updated whenever any of their child objects change. This happens through the touch function, that gets called on any child object when it changes its appearance. This creates an interactive mode in which figures are updated as soon as we adjust their properties. If we combine interactive figures with free-standing functions, we have a "Matlab-like style" for plots. This is a coding pattern where the figure registry works as a stream for plots. The problem with this coding style is that the user might unnecessarily create useless intermediary plots.

Figures in quiet mode are updated by calling the functions draw() or show() (Section Figures and Axes). Unless these functions are called, nothing changes in the figure. The combination of the object-oriented coding style and quiet mode is the "OO-Matplotlib-like style" for plots. This is a coding style in which the user explicitly decides when the plot is shown or updated. This is beneficial to applications that cannot waste computational resources on intermediary figures that might not be valuable to the application.

We generally use free-standing functions with reactive mode and the object-oriented interface with quiet mode. By default, new figures are in reactive mode, unless it is using an non-interactive backend. One can turn this reactive mode on and off with:

  • ion() or ioff() free-standing functions
  • reactive(bool) or quiet(bool) function on the figure object
  • figure(true) or figure(false) when explicitly creating a new figure

A more complete example of the reactive mode would be:

// Reactive mode
auto f = gcf(false);
auto ax = f->gca();
auto p = ax->plot(ax, x, y);   // draws once
p->color("red").line_width(2); // draws twice more
wait();                        // pause console

For convenience, the examples in Section Plot Categories use the reactive mode. The wait function pauses the console until the user interacts with the plot window. If the backend is based on process pipes, because these are unidirectional, closing the window is not enough to resume. The user needs to use the console to unblock execution. A similar example is quiet mode would be

// Quiet mode
auto f = gcf(true);
auto ax = f->gca();
auto p = ax->plot(x,y);        // does not draw
p->color("red").line_width(2); // does not draw
f->show();                     // draw only once and pause console

In this example, the figure is only updated once. The user could replace the show function with the draw function, but the window would close as soon as execution completes. It is important to use wait() and show() with caution. These functions are meant for some particular executables so that an interactive plot does not close before the user can see it. It is probably unreasonable to call these functions inside a library because the user would have to manually interfere with the execution to continue.

Method Chaining

To support a more compact syntax, the library allows method chaining on plot objects. For instance, we can create a simple line plot and modify its appearance by

// Using the line handle
auto p = plot(x,y,"--gs");
p->line_width(2);
p->marker_size(10);
p->marker_color("b");
p->marker_face_color({.5,.5,.5});

or

// Method chaining
plot(x,y,"--gs")->line_width(2).marker_size(10).marker_color("b").marker_face_color({.5,.5,.5});

The first code snippet works because plot returns a line_handle to the object in the axes. We can use this line handle to modify the line plot. Whenever we modify a property, the setter function calls touch, which will draw the figure again if it is in reactive mode. The second option works because setters return a reference to *this rather than void.

Ranges

The plotting functions work on any range of elements convertible to double. For instance, we can create a line plot from a set of elements by

set<int> y = {6,3,8,2,5};
plot(y);

Any object that has the functions begin and end are considered iterable ranges. Most axes object subclasses use vector<double> or vector<vector<double>> to store their data. For convenience, the common.h header file includes the aliases vector_1d and vector_2d to these data types.

These conversions also work on ranges of ranges:

vector<set<int>> Y = {{6,3,8,2,5},{6,3,5,8,2}};
plot(Y);

Unfortunately, because of how templated functions work, one exception is initializer lists. Initializer lists only work for functions that are explicitly defined for them.

Common Utilities

The headers common.h and colors.h include a number of utilities we use in our examples. These include naive functions to generate and manipulate vectors and strings; handle RGBA color arrays; convert points to and from polar coordinates; read files to strings; write strings to files; calculate gradients; read, write, and manipulate images; and generate vectors with random numbers. Although some of these functions might be helpful, most functions only operate on vector<double> and they are not intended to be a library of utilities. The sole purpose of these algorithms is to simplify the examples.

Motivation and Details

If you are interested in understanding how the library works, you can read the details in the complete article. It describes the relationship between its main objects, the backend interface, how to create new plot categories, limitations, and compares this library with similar alternatives.

Integration

CMake (manual download)

Check if you have Cmake 3.14+ installed:

cmake -version

Download the whole project and add the subdirectory to your Cmake project:

add_subdirectory(matplotplusplus)

When creating your executable, link the library to the targets you want:

add_executable(my_target main.cpp)
target_link_libraries(my_target PUBLIC matplot)

Add this header to your source files:

#include <matplot/matplot.h>

CMake (automatic download)

Check if you have Cmake 3.14+ installed:

cmake -version

Install CPM.cmake and then:

CPMAddPackage(
    NAME matplotplusplus
    GITHUB_REPOSITORY alandefreitas/matplotplusplus
)
# ...
target_link_libraries(my_target PUBLIC matplot)

Then add this header to your source files:

#include <matplot/matplot.h>

Other build systems

If you're not using Cmake, your project needs to include the headers and compile all source files in the source directory. You also need to link with the dependencies described in source/matplot/FindDependencies.cmake.

Then add this header to your source files:

#include <matplot/matplot.h>

Dependencies

This project requires C++17. You can see other dependencies in FindDependencies.cmake. CMake will try to solve everything for you.

  • Required
    • olvb/nodesoup (CMake will download it for you)
    • dtschump/CImg (CMake will download it for you)
    • Gnuplot (for the Gnuplot backend only)
  • Optional (for images)
    • JPEG
    • TIFF
    • ZLIB
    • PNG
    • LAPACK
    • BLAS
    • FFTW
    • OpenCV
    • OPENEXR
    • MAGICK

There's an extra target matplot_opengl that exemplifies how an OpenGL backend could be implemented. It's not a complete backend. If you want to test it, only then there are some extra dependencies.

  • Dependencies for the OpenGL backend
    • OpenGL
    • GLAD
    • GLFW3

Backends

Coming up with new backends is a continuous process. See the complete article for a description of the backend interface, a description of the current default backend (Gnuplot pipe), and what's involved in possible new backends. See the directory source/matplot/backend for some examples. Also, have a look at this example test/backends/main.cpp.

Contributing

There are many ways in which you can contribute to this library:

  • Testing the library in new environments
  • Contributing with interesting examples
  • Designing new backends see 1, 2, 3
  • Finding problems in this documentation
  • Writing algorithms for new plot categories
  • Finding bugs in general
  • Whatever idea seems interesting to you

References

  • Abadi M, Barham P, Chen J, Chen Z, Davis A, Dean J, Devin M, Ghemawat S, Irving G,Isard M,et al.(2016). "Tensorflow: A system for large-scale machine learning." In 12th USENIX symposium on operating systems design and implementation (OSDI 16), pp.265-283.

  • Angerson E, Bai Z, Dongarra J, Greenbaum A, McKenney A, Du Croz J, Hammarling S,Demmel J, Bischof C, Sorensen D (1990). "LAPACK: A portable linear algebra library for high-performance computers." In Supercomputing'90: Proceedings of the 1990 ACM/IEEE Conference on Supercomputing, pp. 2-11. IEEE.

  • Antcheva I, Ballintijn M, Bellenot B, Biskup M, Brun R, Buncic N, Canal P, Casadei D, CouetO, Fine V, et al.(2011). "ROOT-A C++ framework for petabyte data storage, statistical analysis and visualization."Computer Physics Communications,182(6), 1384-1385.

  • Baratov R (2019). Hunter. URL: https://hunter.readthedocs.io.

  • Barrett P, Hunter J, Miller JT, Hsu JC, Greenfield P (2005). "matplotlib-A Portable Python Plotting Package." In Astronomical data analysis software and systems XIV, volume 347,p. 91.

  • Bezanson J, Edelman A, Karpinski S, Shah VB (2017). "Julia: A fresh approach to numerical computing. "SIAM review,59(1), 65-98.

  • CEGUI Team (2020). CEGUI. URL: http://cegui.org.uk.

  • Cornut O (2020). Dear ImGui: Bloat-free Immediate Mode Graphical User Interface for C++ with minimal dependencies. URL: https://github.com/ocornut/imgui.

  • de Guzman J (2020). Elements. URL: http://cycfi.github.io/elements/.

  • Eichhammer E (2020). QCustomPlot. URL: https://www.qcustomplot.com.

  • Evers B (2019). Matplotlib-cpp. URL: https://github.com/lava/matplotlib-cpp.

  • Freitas A (2020). Pareto Front Library. URL: https://github.com/alandefreitas/pareto-front.

  • Frigo M, Johnson SG (1998). "FFTW: An adaptive software architecture for the FFT." In Proceedings of the 1998 IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP'98 (Cat. No. 98CH36181), volume 3, pp. 1381-1384. IEEE.

  • Fruchterman TM, Reingold EM (1991). "Graph drawing by force-directed placement. "Software: Practice and experience, 21(11), 1129-1164.

  • GNU Project (2020). GNU Octave: Introduction to Plotting. URL: https://octave.org/doc/v4.2.2/Introduction-to-Plotting.html.

  • Guy Eric Schalnat Andreas Dilger GRP (2020). Libpng. URL: https://sourceforge.net/p/libpng/.

  • Hao J (2020). Nana. URL: http://nanapro.org/.

  • Hunter JD (2007). "Matplotlib: A 2D graphics environment. "Computing in Science & Engineering, 9(3), 90-95. doi:10.1109/MCSE.2007.55.

  • Idea4good (2020). GuiLite. URL: https://github.com/idea4good/GuiLite.

  • ImageMagick Studio LLC (2020). Magick++. URL: https://imagemagick.org/Magick++/.

  • Independent JPEG Group (2020). Libjpeg. URL: http://libjpeg.sourceforge.net.

  • Intel Corporation, Willow Garage I (2020). Open Source Computer Vision Library (OpenCV). URL: https://opencv.org/.

  • Jakob W (2017). PyBind11. URL: https://pybind11.readthedocs.io/en/stable/.

  • Kagstrom B LP, C VL (2020). Basic Linear Algebra Subprograms (BLAS). URL: http://www.netlib.org/blas/.

  • Kainz F, Bogart R, Hess D (2003). "The OpenEXR image file format."SIGGRAPH TechnicalSketches.

  • Kamada T, Kawai S,et al.(1989). "An algorithm for drawing general undirected graphs."Information processing letters,31(1), 7-15.

  • Loup Gailly J, Adler M (2020). Zlib. URL: https://github.com/madler/zlib.

  • Martin K, Hoffman B (2010). Mastering CMake: a cross-platform build system. Kitware.

  • McKinney W,et al.(2011). "Pandas: a foundational Python library for data analysis and statistics. "Python for High Performance and Scientific Computing, 14(9).

  • Conan.io (2020). Conan. URL: https://conan.io.

  • Melchior L (2020). CPM.cmake. URL: https://github.com/TheLartians/CPM.cmake.

  • Murray Cumming DE (2020). Gtkmm. URL: https://www.gtkmm.org/.

  • Natural Earth (2018). "Natural earth. Free vector and raster map data." URL: http://www.naturalearthdata.com/downloads/.

  • NetworkX developers (2020). NetworkX. URL: https://networkx.github.io.

  • OLVB (2020). Node Soup. URL: https://github.com/olvb/nodesoup.

  • Pezent E (2020). ImPlot. URL: https://github.com/epezent/implot.

  • Sam Leffler SG (2020). Libtiff. URL: https://gitlab.com/libtiff/libtiff.

  • Schaling B (2011). The boost C++ libraries. Boris Schaling.

  • Spitzak B, et al.(2004). "Fast Light Toolkit (FLTK)." FTLK: Fast light toolkit. Available: http://www.fltk.org/

  • Stahlke D (2020). Gnuplot-Iostream. URL: http://stahlke.org/dan/gnuplot-iostream/.

  • Storer J (2020). JUCE. URL: https://juce.com.

  • Terra Informatica Software, Inc (2020). Sciter. URL: https://sciter.com.

  • The FLTK Team (2020). FLTK. URL: https://www.fltk.org.

  • The MathWorks, Inc (2020). MatlabGraphics. URL: https://www.mathworks.com/help/matlab/graphics.html.

  • The Qt Company (2020). Qt. URL: https://www.qt.io.

  • Tschumperle D (2020). CImg. URL: http://cimg.eu.

  • van der Zijp J (2020). Fox toolkit. URL: http://fox-toolkit.org.

  • Vasilev V, Canal P, Naumann A, Russo P (2012). "Cling-the new interactive interpreter for root 6." In Journal of Physics: Conference Series, volume 396, p. 052071.

  • Walt Svd, Colbert SC, Varoquaux G (2011). "The NumPy array: a structure for efficient numerical computation." Computing in science & engineering,13(2), 22-30.

  • Wei V (2020). MiniGUI. URL: http://www.minigui.com.

  • Williams T, Kelley C, Bersch C, Broker HB, Campbell J, Cunningham R, Denholm D, Elber G, Fearick R, Grammes C,et al.(2017). "gnuplot 5.2."

  • wxWidgets (2020). WxWidgets. URL: https://wxwidgets.org.

  • XOrg Foundation (2020). X11. URL: https://www.x.org/.

  • Zaitsev S (2020). Webview. URL: https://github.com/zserge/webview.

  • Zakai A (2011). "Emscripten: an LLVM-to-JavaScript compiler." In Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion, pp. 301-312.

About

Matplot++: A C++ Graphics Library for Data Visualization πŸ“ŠπŸ—Ύ

License:MIT License


Languages

Language:C++ 99.7%Language:CMake 0.2%Language:C 0.0%