53 std::vector<std::string>
const& row_labels,
54 std::vector<std::string>
const& col_labels
60 if( ! row_labels.empty() && row_labels.size() != mat.
rows() ) {
61 throw std::invalid_argument(
62 "Svg Matrix drawing expects same number of row labels that the matrix has rows. "
65 if( ! col_labels.empty() && col_labels.size() != mat.
cols() ) {
66 throw std::invalid_argument(
67 "Svg Matrix drawing expects same number of col labels that the matrix has cols. "
73 for(
size_t r = 0; r < mat.
rows(); ++r ) {
74 for(
size_t c = 0; c < mat.
cols(); ++c ) {
83 if( c < mat.
cols() - 1 ) {
86 if( r < mat.
rows() - 1 ) {
97 group << std::move( rct_gr );
100 if( ! row_labels.empty() ) {
102 for(
size_t i = 0; i < row_labels.size(); ++i ) {
104 label.
text = row_labels[i];
111 row_gr << std::move( label );
113 group << std::move( row_gr );
117 if( ! col_labels.empty() ) {
119 for(
size_t i = 0; i < col_labels.size(); ++i ) {
121 label.
text = col_labels[i];
129 col_gr << std::move( label );
131 group << std::move( col_gr );
140 std::vector<std::string>
const& row_labels
143 mat, settings, row_labels, std::vector<std::string>()
152 mat, settings, std::vector<std::string>(), std::vector<std::string>()