From a50661dd449dc566864f44361b7284f43361db9f Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Tue, 23 Mar 2021 22:11:16 +0100 Subject: [PATCH] fix bar for unsorted x input --- src/recipes.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/recipes.jl b/src/recipes.jl index b69ed3f3..ed6f2331 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -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