/* 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);
}
/* Draw tick mark on x axis */
- draw_tick(cr, geom, SCALE_ABSCISSA, box_centre - geom->axis[SCALE_ABSCISSA].data_min, "%s", name);
+ draw_tick (cr, geom, SCALE_ABSCISSA, false,
+ box_centre - geom->axis[SCALE_ABSCISSA].data_min, "%s", name);
}
void
double box_width;
size_t i;
- xrchart_write_yscale (cr, geom, boxplot->y_min, boxplot->y_max, 5);
+ xrchart_write_yscale (cr, geom, boxplot->y_min, boxplot->y_max);
xrchart_write_title (cr, geom, "%s", chart_item->title);
box_width = (geom->axis[SCALE_ABSCISSA].data_max - geom->axis[SCALE_ABSCISSA].data_min) / boxplot->n_boxes / 2.0;