- /* I really need to start addign some unit setting thing */
- switch (output_units.volume) {
- case LITER:
- unit = "l";
- break;
- case CUFT:
- unit = "cuft";
- airuse /= liters_per_cuft;
- break;
- }
- plot_text(gc, &tro, 0.8, 0.8, "vol: %4.2f %s", airuse, unit);
- if (dive->duration.seconds) {
- double pressure = 1 + (dive->meandepth.mm / 10000.0);
- double sac = airuse / pressure * 60 / dive->duration.seconds;
- plot_text(gc, &tro, 0.8, 0.85, "SAC: %4.2f %s/min", sac, unit);
- }
- desc = dive->cylinder[0].type.description;
- if (desc || dive->cylinder[0].gasmix.o2.permille) {
- int o2 = dive->cylinder[0].gasmix.o2.permille / 10;
- if (!desc)
- desc = "";
- if (!o2)
- o2 = 21;
- plot_text(gc, &tro, 0.8, 0.9, "%s (%d%%)", desc, o2);
+ cairo_set_source_rgba(gc->cr, 0.2, 1.0, 0.2, 0.80);
+
+ move_to(gc, 0, pi->maxpressure);
+ for (i = 1; i < pi->nr; i++) {
+ int mbar;
+ struct plot_data *entry = pi->entry + i;
+
+ mbar = entry->pressure;
+ if (!mbar)
+ continue;
+ line_to(gc, entry->sec, mbar);