mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fixed histogram plotter for 0
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@229 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
6a069c1a4f
commit
270c5eb18f
1 changed files with 2 additions and 2 deletions
|
@ -142,10 +142,10 @@ void hist_plot(unsigned *hist, int length)
|
|||
memset(buf, '#', sizeof(buf));
|
||||
for (int i = 0; i < length; i++) {
|
||||
bar = HIST_HEIGHT * (float) hist[i] / hist[max];
|
||||
if (i == max)
|
||||
if (hist[i] == hist[max])
|
||||
info("%2u | " RED("%5u") " | " BLD("%.*s"), i, hist[i], bar, buf);
|
||||
else if (hist[i] == 0)
|
||||
info("%2u | " GRN("%5u") " | " "%.*s", i, hist[i], bar, buf);
|
||||
info("%2u | " GRN("%5u") " | " , i, hist[i]);
|
||||
else
|
||||
info("%2u | " "%5u" " | " "%.*s", i, hist[i], bar, buf);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue