X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbox-whisker.c;h=73d0866a2e1cb8d06e5082eab3a78bd933dc2a0f;hb=f3cf52b51e6d89e94190de22b1fa813e8d3746f7;hp=f634c2850c6058c0c010768fc7f8fce021374ce0;hpb=4fdeb2145d081ff1b84e3f6c99f9d1c048c0d64a;p=pspp diff --git a/src/box-whisker.c b/src/box-whisker.c index f634c2850c..73d0866a2e 100644 --- a/src/box-whisker.c +++ b/src/box-whisker.c @@ -80,9 +80,6 @@ boxplot_draw_boxplot(struct chart *ch, double whisker[2]; int i; - assert(m); - - const double *hinge = m->hinge; struct weighted_value **wvp = m->wvp; const int n_data = m->n_data; @@ -102,6 +99,8 @@ boxplot_draw_boxplot(struct chart *ch, const double box_top = ch->data_bottom + ( hinge[2] - ch->y_min ) * ch->ordinate_scale; + assert(m); + /* Can't really draw a boxplot if there's no data */ if ( n_data == 0 ) return ; @@ -119,7 +118,7 @@ boxplot_draw_boxplot(struct chart *ch, } - + { const double bottom_whisker = ch->data_bottom + ( whisker[0] - ch->y_min ) * ch->ordinate_scale; @@ -181,6 +180,7 @@ boxplot_draw_boxplot(struct chart *ch, pl_fline_r(ch->lp, box_centre, top_whisker, box_centre, box_top); + } /* Draw outliers */ for ( i = 0 ; i < n_data ; ++i )