From 65e6f30f9c6333dffe42d29c5a0e7cbf5c06686d Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Sat, 12 Jun 2021 11:46:31 +0200 Subject: [PATCH] defensive copy on plot(plots) --- src/plot.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plot.jl b/src/plot.jl index 914dbc9d..7fcdfceb 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -99,9 +99,9 @@ function plot(plt1::Plot, plts_tail::Plot...; kw...) # build our plot vector from the args n = length(plts_tail) + 1 plts = Array{Plot}(undef, n) - plts[1] = plt1 + plts[1] = deepcopy(plt1) for (i,plt) in enumerate(plts_tail) - plts[i+1] = plt + plts[i+1] = deepcopy(plt) end # compute the layout