/[pspp]/pspp/src/box-whisker.c
ViewVC logotype

Diff of /pspp/src/box-whisker.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by jmd, Fri Apr 29 01:02:13 2005 UTC revision 1.6 by jmd, Sun May 8 00:13:19 2005 UTC
# Line 80  boxplot_draw_boxplot(struct chart *ch, Line 80  boxplot_draw_boxplot(struct chart *ch,
80    double whisker[2];    double whisker[2];
81    int i;    int i;
82    
   assert(m);  
   
   
83    const double *hinge = m->hinge;    const double *hinge = m->hinge;
84    struct weighted_value **wvp = m->wvp;    struct weighted_value **wvp = m->wvp;
85    const int n_data = m->n_data;    const int n_data = m->n_data;
# Line 102  boxplot_draw_boxplot(struct chart *ch, Line 99  boxplot_draw_boxplot(struct chart *ch,
99    const double box_top =    const double box_top =
100      ch->data_bottom + ( hinge[2] - ch->y_min ) * ch->ordinate_scale;      ch->data_bottom + ( hinge[2] - ch->y_min ) * ch->ordinate_scale;
101    
102      assert(m);
103    
104    /* Can't really draw a boxplot if there's no data */    /* Can't really draw a boxplot if there's no data */
105    if ( n_data == 0 )    if ( n_data == 0 )
106            return ;            return ;
# Line 119  boxplot_draw_boxplot(struct chart *ch, Line 118  boxplot_draw_boxplot(struct chart *ch,
118            
119      }      }
120            
121        {
122    const double bottom_whisker =    const double bottom_whisker =
123      ch->data_bottom + ( whisker[0] - ch->y_min ) * ch->ordinate_scale;      ch->data_bottom + ( whisker[0] - ch->y_min ) * ch->ordinate_scale;
124    
# Line 181  boxplot_draw_boxplot(struct chart *ch, Line 180  boxplot_draw_boxplot(struct chart *ch,
180    pl_fline_r(ch->lp,    pl_fline_r(ch->lp,
181               box_centre, top_whisker,               box_centre, top_whisker,
182               box_centre, box_top);               box_centre, box_top);
183      }
184    
185    /* Draw outliers */    /* Draw outliers */
186    for ( i = 0 ; i < n_data ; ++i )    for ( i = 0 ; i < n_data ; ++i )

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26