go(plot): decouple extension from filename
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-07-11 21:41:05 +02:00
parent fc080c3b8e
commit 65b1ce02df
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -99,11 +99,10 @@ func plotAllDims(algoStats []stats.Stats, fPrefix, fExt string, wg *sync.WaitGro
util.SanitiseFName(dim.BenchName) + "-" +
fmt.Sprint(s.Dimens) + "D-" +
fmt.Sprint(s.Generations) + "G-" +
fmt.Sprint(len(dim.Solution)) + "I" +
fExt
fmt.Sprint(len(dim.Solution)) + "I"
elapsed := time.Since(start)
info := "saving img to file: " + filename +
info := "saving img to file: " + filename + fExt +
" [generated in " + fmt.Sprint(elapsed) + "]"
if s.Algo == "Random Search" {
@ -116,7 +115,7 @@ func plotAllDims(algoStats []stats.Stats, fPrefix, fExt string, wg *sync.WaitGro
if err := p.Save(
pWidth,
pHeight,
filename,
filename+fExt,
); err != nil {
panic(err)
}