fix bar for unsorted x input

This commit is contained in:
Daniel Schwabeneder 2021-03-23 22:11:16 +01:00
parent 9fc1d574cd
commit a50661dd44

View File

@ -398,7 +398,7 @@ end
bw = plotattributes[:bar_width]
hw = if bw === nothing
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
0.5 * _bar_width
end