| 143 | } |
| 144 | |
| 145 | static void draw_y_axis(Agg2D& painter, |
| 146 | double x, |
| 147 | double y1, |
| 148 | double y2, |
| 149 | double lo, |
| 150 | double hi, |
| 151 | double step, |
| 152 | const std::string& format) |
| 153 | { |
| 154 | painter.noFill(); |
| 155 | painter.lineColor(0, 0, 0); |
| 156 | painter.line(x, y1, x, y2); |
| 157 | painter.textSize(10.0); |
| 158 | painter.textAlignment(Agg2D::AlignRight); |
| 159 | |
| 160 | do_in_steps(y1, |
| 161 | y2, |
| 162 | lo, |
| 163 | hi, |
| 164 | step, |
| 165 | [&](double y, double v) |
| 166 | { |
| 167 | painter.line(x, y, x - 5, y); |
| 168 | painter.text(x - 8, y + 5.0, fmt::format(fmt::runtime(format), v)); |
| 169 | }); |
| 170 | } |
| 171 | |
| 172 | static void draw_x_axis(Agg2D& painter, |
| 173 | double x1, |
no test coverage detected