marker positions rounded like bar lengths
[barcat.git] / barcat
diff --git a/barcat b/barcat
index efb631f248964c7714c4852ae6883c1668681a25..04452498d213f24f5ce612d5bf482eff332efbae 100755 (executable)
--- a/barcat
+++ b/barcat
@@ -323,7 +323,7 @@ if ($opt{markers} and $size > 0) {
                        $pos &&= log $pos if $opt{log};
                        $pos >= 0 or next;
                        $increment ||= $minval && !$pos;
-                       color(36) for $barmark[$pos / $range * $size + $increment] = $char;
+                       color(36) for $barmark[$pos / $range * $size + $increment + .5] = $char;
                }
        }