From 773c7a90b4eb64f1ef8e9f714d348ed11e6f7d29 Mon Sep 17 00:00:00 2001 From: t-bltg <13423344+t-bltg@users.noreply.github.com> Date: Sun, 1 Aug 2021 14:16:07 +0200 Subject: [PATCH] Gaston: conditional add_to_legend --- src/backends/gaston.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/gaston.jl b/src/backends/gaston.jl index 7c171ce7..484bf247 100644 --- a/src/backends/gaston.jl +++ b/src/backends/gaston.jl @@ -203,7 +203,6 @@ function gaston_add_series(plt::Plot{GastonBackend}, series::Series) end end else - seriesconf = gaston_seriesconf!(sp, series, 1) if z isa Surface z = z.surf if st == :image @@ -269,7 +268,8 @@ function gaston_seriesconf!(sp::Subplot{GastonBackend}, series::Series, i::Int) w: with =# gsp = sp.o; st = series[:seriestype]; extra = [] - curveconf = String[should_add_to_legend(series) ? "title '$(series[:label])'" : "notitle"] + add_to_legend = should_add_to_legend(series) && i == 1 + curveconf = String[add_to_legend ? "title '$(series[:label])'" : "notitle"] clims = get_clims(sp, series) if st ∈ (:scatter, :scatter3d)