From 57b48da670cb7ed9c59c6a1881582a556f5b849b Mon Sep 17 00:00:00 2001 From: t-bltg <13423344+t-bltg@users.noreply.github.com> Date: Sat, 31 Jul 2021 15:02:40 +0200 Subject: [PATCH] Gaston: conditional label in legend --- src/backends/gaston.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backends/gaston.jl b/src/backends/gaston.jl index 057e5cf6..8f00019a 100644 --- a/src/backends/gaston.jl +++ b/src/backends/gaston.jl @@ -230,7 +230,11 @@ function gaston_seriesconf!(sp, series::Series) st = series[:seriestype] clims = get_clims(sp, series) - label = "title \"$(series[:label])\"" + label = if should_add_to_legend(series) + "title \"$(series[:label])\"" + else + "notitle" + end if st ∈ (:scatter, :scatter3d) pt, ps, lc = gaston_mk_ms_mc(series) push!(curveconf, "with points pt $pt ps $ps lc $lc") @@ -251,7 +255,6 @@ function gaston_seriesconf!(sp, series::Series) elseif st == :steppost push!(curveconf, "with fsteps") # Not sure if not the other way elseif st ∈ (:contour, :contour3d) - label = "notitle" push!(curveconf, "with lines") if st == :contour gsp.axesconf *= "\nset view map\nunset surface" # 2D