From: John Darrington Date: Sun, 25 Mar 2012 23:30:56 +0000 (+0200) Subject: Simplify algebra X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b3938165488f5562ab4c1e4a808f2f36407956c;p=pspp Simplify algebra --- diff --git a/src/output/charts/plot-hist-cairo.c b/src/output/charts/plot-hist-cairo.c index ca1a30807a..87409b1a90 100644 --- a/src/output/charts/plot-hist-cairo.c +++ b/src/output/charts/plot-hist-cairo.c @@ -86,9 +86,7 @@ hist_draw_bar (cairo_t *cr, const struct xrchart_geometry *geom, assert ( upper >= lower); - height = gsl_histogram_get (h, bar) / - (geom->axis[SCALE_ORDINATE].max - geom->axis[SCALE_ORDINATE].min) * - (geom->axis[SCALE_ORDINATE].data_max - geom->axis[SCALE_ORDINATE].data_min); + height = geom->axis[SCALE_ORDINATE].scale * gsl_histogram_get (h, bar); cairo_rectangle (cr, geom->axis[SCALE_ABSCISSA].data_min + x_pos,