X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcharts%2Fboxplot-cairo.c;h=d798bc2abbdbd6abd3f2de087d7549634fdb9539;hb=61048d83fca0063d3205ccabe0c610346fca905b;hp=a35b277b8cfa97154399b7a4f9018acfa07c7886;hpb=a0b0ffb38287336c2ebdc629956d3ced64dc12d5;p=pspp diff --git a/src/output/charts/boxplot-cairo.c b/src/output/charts/boxplot-cairo.c index a35b277b8c..d798bc2abb 100644 --- a/src/output/charts/boxplot-cairo.c +++ b/src/output/charts/boxplot-cairo.c @@ -113,14 +113,20 @@ boxplot_draw_box (cairo_t *cr, const struct xrchart_geometry *geom, /* Draw centre line. (bottom half) */ - cairo_move_to (cr, box_centre, bottom_whisker); - cairo_line_to (cr, box_centre, box_bottom); - cairo_stroke (cr); + if (! isnan (whisker[0])) + { + cairo_move_to (cr, box_centre, bottom_whisker); + cairo_line_to (cr, box_centre, box_bottom); + cairo_stroke (cr); + } - /* (top half) */ - cairo_move_to (cr, box_centre, top_whisker); - cairo_line_to (cr, box_centre, box_top); - cairo_stroke (cr); + if (! isnan (whisker[1])) + { + /* (top half) */ + cairo_move_to (cr, box_centre, top_whisker); + cairo_line_to (cr, box_centre, box_top); + cairo_stroke (cr); + } outliers = box_whisker_outliers (bw); for (ll = ll_head (outliers);