From 5a4651a0ecbaf9ab9794b8dfae44395b44e88b7d Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Wed, 28 Apr 2021 20:35:00 +0200 Subject: [PATCH] clean changes in recipes.jl --- src/recipes.jl | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index b357968a..952bf0aa 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -472,23 +472,13 @@ end fillto = map(x -> _is_positive(x) ? typeof(baseline)(x) : baseline, fillto) end - annotations = pop_kw!(plotattributes, :series_annotations, nothing) - isvert = isvertical(plotattributes) - if !isnothing(annotations) - @series begin - primary := false - seriestype := :scatter - markersize := 0 - series_annotations := annotations - orientation := default(:orientation) - isvert ? (x, y) : (y, x) + if !isnothing(plotattributes[:series_annotations]) + if isvertical(plotattributes) + annotations := (x,y,plotattributes[:series_annotations].strs,:bottom) + else + annotations := (y,x,plotattributes[:series_annotations].strs,:left) end - # if isvertical(plotattributes) - # annotations := (x,y,plotattributes[:series_annotations].strs,:bottom) - # else - # annotations := (y,x,plotattributes[:series_annotations].strs,:left) - # end - # series_annotations := nothing + series_annotations := nothing end # create the bar shapes by adding x/y segments @@ -515,7 +505,7 @@ end expand_extrema!(axis, widen(ignorenan_extrema(xseg.pts)...)) # switch back - if !isvert + if !isvertical(plotattributes) xseg, yseg = yseg, xseg end