From 40848e7432a9468eb29dd0a680cfce1f0bb8da88 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Mon, 4 May 2020 18:16:29 +0200 Subject: [PATCH] fix error recipes (#2665) * fix scatterbins * fix zerror --- src/recipes.jl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index 7e12a7b1..3ca33ce9 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -537,14 +537,19 @@ end @recipe function f(::Type{Val{:scatterbins}}, x, y, z) edge, weights, xscale, yscale, baseline = _preprocess_binlike(plotattributes, x, y) - xerror := diff(edge) / 2 + @series begin + x := _bin_centers(edge) + xerror := diff(edge) / 2 + primary := false + seriestype := :xerror + () + end x := _bin_centers(edge) y := weights seriestype := :scatter () end -@deps scatterbins scatter - +@deps scatterbins xerror scatter function _stepbins_path( edge, @@ -1094,7 +1099,7 @@ end end () end -@deps xerror path +@deps zerror path # TODO: move quiver to PlotRecipes