static void plot(cairo_t *cr, int w, int h, struct dive *dive) { double topx, topy, maxx, maxy; double scalex, scaley; topx = w / 20.0; topy = h / 20.0; maxx = (w - 2*topx); maxy = (h - 2*topy); /* Depth profile */ plot_profile(dive, cr, topx, topy, maxx, maxy); /* Cylinder pressure plot? */ plot_cylinder_pressure(dive, cr, topx, topy, maxx, maxy); /* Bounding box last */ scalex = scaley = 1.0; cairo_set_source_rgb(cr, 1, 1, 1); cairo_move_to(cr, SCALE(0,0)); cairo_line_to(cr, SCALE(0,1)); cairo_line_to(cr, SCALE(1,1)); cairo_line_to(cr, SCALE(1,0)); cairo_close_path(cr); cairo_stroke(cr); }
std::string ds::BinnedData::plot_average() const { return plot_profile(true); }
std::string ds::BinnedData::plot_sum() const { return plot_profile(false); }