| 90 | } |
| 91 | |
| 92 | std::string matrix::plot_string() { |
| 93 | std::string res = "'-' with"; |
| 94 | if (!has_alpha()) { |
| 95 | if (matrices_.size() < 3) { |
| 96 | // image with colors from colormap |
| 97 | res += " image"; |
| 98 | } else { |
| 99 | // 3 components for each point |
| 100 | res += " rgbimage"; |
| 101 | } |
| 102 | } else { |
| 103 | // 4 components for each point |
| 104 | // even if matrices_.size() == 1 |
| 105 | res += " rgbalpha"; |
| 106 | } |
| 107 | |
| 108 | if (should_plot_labels()) { |
| 109 | // low values in black |
| 110 | res += ", '-' with labels font \"" + escape(parent_->font()) + "," + |
| 111 | num2str(round(parent_->font_size())) + |
| 112 | "\" textcolor 'black'"; |
| 113 | // high values in white |
| 114 | res += ", '-' with labels font \"" + escape(parent_->font()) + "," + |
| 115 | num2str(round(parent_->font_size())) + |
| 116 | "\" textcolor 'white'"; |
| 117 | } |
| 118 | return res; |
| 119 | } |
| 120 | |
| 121 | bool matrix::should_plot_labels() { |
| 122 | if (always_hide_labels_ || matrices_.size() > 1) { |