mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fixed another glitch in the histogram plot
git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@239 8ec27952-4edc-4aab-86aa-e87bb2611832
This commit is contained in:
parent
638d6344e5
commit
ee047e0003
1 changed files with 3 additions and 3 deletions
|
@ -139,10 +139,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 (hist[i] == hist[max])
|
||||
info("%2u | " RED("%5u") " | " BLD("%.*s"), i, hist[i], bar, buf);
|
||||
else if (hist[i] == 0)
|
||||
if (hist[i] == 0)
|
||||
info("%2u | " GRN("%5u") " | " , i, hist[i]);
|
||||
else if (hist[i] == hist[max])
|
||||
info("%2u | " RED("%5u") " | " BLD("%.*s"), i, hist[i], bar, buf);
|
||||
else
|
||||
info("%2u | " "%5u" " | " "%.*s", i, hist[i], bar, buf);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue