From af119a024896adc1101b46ffa1e7f0aa224f66c7 Mon Sep 17 00:00:00 2001 From: Diego Javier Zea Date: Tue, 30 Oct 2018 15:15:03 +0100 Subject: [PATCH] It solves Shape bugs unneeded get and missing undef --- src/components.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components.jl b/src/components.jl index ddd78383..46fc0f7d 100644 --- a/src/components.jl +++ b/src/components.jl @@ -491,7 +491,7 @@ function series_annotations_shapes!(series::Series, scaletype::Symbol = :pixels) # with a list of custom shapes for each msw,msh = anns.scalefactor msize = Float64[] - shapes = Vector{Shape}(length(anns.strs)) + shapes = Vector{Shape}(undef, length(anns.strs)) for i in eachindex(anns.strs) str = _cycle(anns.strs,i) @@ -509,7 +509,7 @@ function series_annotations_shapes!(series::Series, scaletype::Symbol = :pixels) # and then re-scale a copy of baseshape to match the w/h ratio maxscale = max(xscale, yscale) push!(msize, maxscale) - baseshape = _cycle(get(anns.baseshape),i) + baseshape = _cycle(anns.baseshape, i) shapes[i] = scale(baseshape, msw*xscale/maxscale, msh*yscale/maxscale, (0,0)) end series[:markershape] = shapes