From c433b11eeab95ef98b53d6c1f900792f37816170 Mon Sep 17 00:00:00 2001 From: surtur Date: Tue, 19 Jul 2022 21:25:09 +0200 Subject: [PATCH] go(plot): latex-proof regular pic's caption, too --- algo/plot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/algo/plot.go b/algo/plot.go index ede1ee6..20b4e79 100644 --- a/algo/plot.go +++ b/algo/plot.go @@ -109,8 +109,8 @@ func plotAllDims(algoStats []stats.Stats, fPrefix, fExt string, ch chan report.P p.Title.Text = "D: " + fmt.Sprint(s.Dimens) + ", G: " + fmt.Sprint(s.Generations) + ", I: " + fmt.Sprint(s.Iterations) - // pic.Caption = p.Title.Text - pic.Caption = "" + // this is latex-rendered. + pic.Caption = strings.ReplaceAll(p.Title.Text, " ", "~") // since a single stat slice of algoStats only contains results of a // single bench func, it's safe to set the value like this.