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); |
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 ; |