plot: set x-axis label to FES for MeanVals
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
leo 2023-02-21 23:45:39 +01:00
parent 5e4eee8853
commit f4f5f366e9
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

View File

@ -26,6 +26,7 @@
titlePreferredFont = "Sans"
yAxisLabel = "f(x)"
xAxisLabel = "Generations"
xAxisLabelAlt = "FES"
)
// PlotMeanValsMulti creates plots for every member of 'stats.AlgoMeanVals' it
@ -56,7 +57,8 @@ func PlotMeanValsMulti(
iterations, bench, dimens,
)
p.X.Label.Text = "Objective func. evaluations"
// p.X.Label.Text = "Objective func. evaluations"
p.X.Label.Text = xAxisLabelAlt
p.X.Label.TextStyle.Font.Variant = preferredFont
p.X.Label.TextStyle.Font.Weight = 1 // Medium
p.X.Tick.Label.Font.Variant = preferredFont
@ -164,7 +166,7 @@ func plotMeanVals(meanVals []float64, title, algo string, fes int) *plot.Plot {
p.Title.Text = "Mean - " + title
if strings.Contains(algo, "DE") || strings.Contains(algo, "SOMA") {
p.X.Label.Text = "FES"
p.X.Label.Text = xAxisLabelAlt
} else {
p.X.Label.Text = xAxisLabel
}
@ -269,7 +271,7 @@ func plotAllDims(algoStats []stats.Stats, fPrefix, fExt string, ch chan report.P
pLMean.Bench = s.BenchFuncStats[0].BenchName
if strings.Contains(s.Algo, "DE") {
p.X.Label.Text = "FES"
p.X.Label.Text = xAxisLabelAlt
} else {
p.X.Label.Text = xAxisLabel
}