X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fboxplot-cairo.c;h=8448b2d6c411d41431a91a99cf561700071d2a01;hb=df1d194af32e35739355981252785e768f21ebb0;hp=041b4fabb8decb597bec804a7e6bcf83497a7d0c;hpb=96994a54e60e9c95b8bba54c2281acf7059b1203;p=pspp diff --git a/src/output/charts/boxplot-cairo.c b/src/output/charts/boxplot-cairo.c index 041b4fabb8..8448b2d6c4 100644 --- a/src/output/charts/boxplot-cairo.c +++ b/src/output/charts/boxplot-cairo.c @@ -145,15 +145,17 @@ boxplot_draw_box (cairo_t *cr, const struct xrchart_geometry *geom, } void -xrchart_draw_boxplot (const struct chart_item *chart_item, cairo_t *cr, +xrchart_draw_boxplot (const struct chart *chart, cairo_t *cr, struct xrchart_geometry *geom) { - const struct boxplot *boxplot = to_boxplot (chart_item); + const struct boxplot *boxplot = to_boxplot (chart); double box_width; size_t i; - xrchart_write_yscale (cr, geom, boxplot->y_min, boxplot->y_max); - xrchart_write_title (cr, geom, "%s", chart_item->title); + if (! xrchart_write_yscale (cr, geom, boxplot->y_min, boxplot->y_max)) + return; + + xrchart_write_title (cr, geom, "%s", chart->title); box_width = (geom->axis[SCALE_ABSCISSA].data_max - geom->axis[SCALE_ABSCISSA].data_min) / boxplot->n_boxes / 2.0; for (i = 0; i < boxplot->n_boxes; i++)