1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fix histograms plots

This commit is contained in:
Steffen Vogel 2015-10-14 12:18:25 +02:00
parent ab8723ba8f
commit 14c03ee70c

View file

@ -134,11 +134,12 @@ void hist_plot(struct hist *h)
line();
for (int i = 0; i < h->length; i++) {
int bar = HIST_HEIGHT * ((double) h->data[i] / max);
if (bar == 0)
continue;
double value = VAL(h, i);
int cnt = h->data[i];
int bar = HIST_HEIGHT * ((double) cnt / max);
stats("%+9g | " "%5u" " | %.*s", VAL(h, i), h->data[i], bar, buf);
if (value > h->lowest || value < h->highest)
stats("%+9g | " "%5u" " | %.*s", value, cnt, bar, buf);
}
}