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