/[pspp]/pspp/src/barchart.c
ViewVC logotype

Diff of /pspp/src/barchart.c

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

revision 1.3 by jmd, Fri Apr 29 01:02:13 2005 UTC revision 1.4 by jmd, Sun May 8 00:13:19 2005 UTC
# Line 114  void Line 114  void
114  draw_barchart(struct chart *ch, const char *title,  draw_barchart(struct chart *ch, const char *title,
115                const char *xlabel, const char *ylabel, enum bar_opts opt)                const char *xlabel, const char *ylabel, enum bar_opts opt)
116  {  {
   
117    double d;    double d;
118    int i;    int i;
119    
# Line 122  draw_barchart(struct chart *ch, const ch Line 121  draw_barchart(struct chart *ch, const ch
121        
122    double bar_width = interval_size / 1.1 ;    double bar_width = interval_size / 1.1 ;
123    
124      double ordinate_scale = fabs(ch->data_top -  ch->data_bottom) /
125        fabs(y_max - y_min) ;
126    
127    if ( opt != BAR_STACKED )    if ( opt != BAR_STACKED )
128        bar_width /= SUB_CATAGORIES;        bar_width /= SUB_CATAGORIES;
129    
   double ordinate_scale = fabs(ch->data_top -  ch->data_bottom) / fabs(y_max - y_min) ;  
   
130    /* Move to data bottom-left */    /* Move to data bottom-left */
131    pl_move_r(ch->lp, ch->data_left, ch->data_bottom);    pl_move_r(ch->lp, ch->data_left, ch->data_bottom);
132    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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