| 41 | } |
| 42 | |
| 43 | std::string labels::plot_string() { |
| 44 | std::string res = " '-' with labels"; |
| 45 | switch (alignment_) { |
| 46 | case alignment::left: |
| 47 | res += " left"; |
| 48 | break; |
| 49 | case alignment::right: |
| 50 | res += " right"; |
| 51 | break; |
| 52 | case alignment::center: |
| 53 | res += " center"; |
| 54 | break; |
| 55 | default: |
| 56 | break; |
| 57 | } |
| 58 | res += " font \"" + escape(font()) + "," + |
| 59 | num2str(unsigned(font_size())) + "\""; |
| 60 | if (!colors_.empty()) { |
| 61 | res += " textcolor palette"; |
| 62 | } else { |
| 63 | res += " textcolor rgb '" + to_string(color_) + "'"; |
| 64 | } |
| 65 | return res; |
| 66 | } |
| 67 | |
| 68 | std::string labels::data_string() { |
| 69 | // in absolute size, the rectangles match the words when |