From f02fb0d238f375ddc47c93bbd798093e4e335277 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 13 Jun 2021 09:47:22 +0200 Subject: [PATCH 1/3] fix series_annotations for bar --- src/recipes.jl | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index c2911db9..558da726 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -472,16 +472,6 @@ end fillto = map(x -> _is_positive(x) ? typeof(baseline)(x) : baseline, fillto) end - 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 - series_annotations := nothing - end - - # create the bar shapes by adding x/y segments xseg, yseg = Segments(), Segments() for i = 1:ny yi = procy[i] @@ -507,15 +497,29 @@ end # switch back if !isvertical(plotattributes) xseg, yseg = yseg, xseg + x, y = y, x end - # reset orientation orientation := default(:orientation) - x := xseg.pts - y := yseg.pts - seriestype := :shape + # draw the bar shapes + @series begin + seriestype := shape + series_annotations := nothing + primary := true + x := xsegs.pts + y := ysegs.pts + () + end + + # add empty series + primary := false + seriestype := :scatter + markersize := 0 + msrkeralpha := 0 + x := x + y := y () end @deps bar shape From 99165a5e80c8eacd8e283b20c89b75a0eea8d934 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 13 Jun 2021 09:57:53 +0200 Subject: [PATCH 2/3] fix my typos in bar recipe --- src/recipes.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index 558da726..e36b93f1 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -505,11 +505,11 @@ end # draw the bar shapes @series begin - seriestype := shape + seriestype := :shape series_annotations := nothing primary := true - x := xsegs.pts - y := ysegs.pts + x := xseg.pts + y := yseg.pts () end From 004118956842d303f18dc9d003cde86e907871a8 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 13 Jun 2021 12:28:27 +0200 Subject: [PATCH 3/3] fix fillrange of annotation series for groupedbar --- src/recipes.jl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index e36b93f1..cd1dce43 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -497,7 +497,7 @@ end # switch back if !isvertical(plotattributes) xseg, yseg = yseg, xseg - x, y = y, x + x, y = y, x end # reset orientation @@ -505,19 +505,20 @@ end # draw the bar shapes @series begin - seriestype := :shape - series_annotations := nothing - primary := true - x := xseg.pts - y := yseg.pts - () + seriestype := :shape + series_annotations := nothing + primary := true + x := xseg.pts + y := yseg.pts + () end # add empty series primary := false seriestype := :scatter markersize := 0 - msrkeralpha := 0 + markeralpha := 0 + fillrange := nothing x := x y := y ()