#include<matplot/matplot.h>#include<random>#include<tuple>intmain(){usingnamespacematplot;std::vector<std::vector<double>>X={randn(100,0,1),randn(100,0,1),randn(100,0,1)};auto[S,H,axs]=plotmatrix(X);(void)H;S[2][0]->color("g");S[2][0]->marker("*");axs[0][1]->title("A Comparison of Data Sets");show();return0;}
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.