/[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.6 by blp, Sun Jul 31 21:42:46 2005 UTC revision 1.7 by jmd, Mon Oct 24 01:02:34 2005 UTC
# Line 41  histogram_write_legend(struct chart *ch, Line 41  histogram_write_legend(struct chart *ch,
41  {  {
42    char buf[100];    char buf[100];
43    if ( !ch )    if ( !ch )
44            return ;      return ;
45    
46    pl_savestate_r(ch->lp);    pl_savestate_r(ch->lp);
47    
# Line 121  histogram_plot(const gsl_histogram *hist Line 121  histogram_plot(const gsl_histogram *hist
121        
122    struct chart *ch;    struct chart *ch;
123    
   bins = gsl_histogram_bins(hist);  
   
124    ch = chart_create();    ch = chart_create();
125    chart_write_title(ch, _("HISTOGRAM"));    chart_write_title(ch, _("HISTOGRAM"));
126    
127    chart_write_ylabel(ch, _("Frequency"));    chart_write_ylabel(ch, _("Frequency"));
128    chart_write_xlabel(ch, factorname);    chart_write_xlabel(ch, factorname);
129    
130      if ( ! hist ) /* If this happens, probably all values are SYSMIS */
131        {
132          chart_submit(ch);
133          return ;
134        }
135      else
136        {
137          bins = gsl_histogram_bins(hist);
138        }
139    
140    chart_write_yscale(ch, 0, gsl_histogram_max_val(hist), 5);    chart_write_yscale(ch, 0, gsl_histogram_max_val(hist), 5);
141    
142    for ( i = 0 ; i < bins ; ++i )    for ( i = 0 ; i < bins ; ++i )

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

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