Merge pull request #3367 from daschw/bar

fix bar for unsorted x input
This commit is contained in:
Daniel Schwabeneder 2021-03-26 18:31:00 +01:00 committed by GitHub
commit 71fd38fe26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -398,7 +398,7 @@ end
bw = plotattributes[:bar_width] bw = plotattributes[:bar_width]
hw = if bw === nothing hw = if bw === nothing
if nx > 1 if nx > 1
0.5 * _bar_width * ignorenan_minimum(filter(x -> x > 0, diff(procx))) 0.5 * _bar_width * ignorenan_minimum(filter(x -> x > 0, diff(sort(procx))))
else else
0.5 * _bar_width 0.5 * _bar_width
end end