/[pspp]/pspp/src/plot-hist.c
ViewVC logotype

Diff of /pspp/src/plot-hist.c

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

revision 1.2 by jmd, Fri Jan 14 04:05:47 2005 UTC revision 1.3 by jmd, Wed Apr 13 10:09:59 2005 UTC
# Line 39  void Line 39  void
39  histogram_write_legend(struct chart *ch, const struct normal_curve *norm)  histogram_write_legend(struct chart *ch, const struct normal_curve *norm)
40  {  {
41    char buf[100];    char buf[100];
42      if ( !ch )
43              return ;
44    
45    pl_savestate_r(ch->lp);    pl_savestate_r(ch->lp);
46    
47    sprintf(buf,"N = %.2f",norm->N);    sprintf(buf,"N = %.2f",norm->N);
# Line 66  hist_draw_bar(struct chart *ch, const gs Line 69  hist_draw_bar(struct chart *ch, const gs
69    double lower;    double lower;
70    double height;    double height;
71    
72      if ( !ch )
73              return ;
74    const size_t bins = gsl_histogram_bins(hist);    const size_t bins = gsl_histogram_bins(hist);
75    const double x_pos = (ch->data_right - ch->data_left) * bar / (double) bins ;    const double x_pos = (ch->data_right - ch->data_left) * bar / (double) bins ;
76    const double width = (ch->data_right - ch->data_left) / (double) bins ;    const double width = (ch->data_right - ch->data_left) / (double) bins ;

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

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