go(algo/plot.go): set label,legend text style
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
54c01dc616
commit
b6e7e916ce
12
algo/plot.go
12
algo/plot.go
@ -14,6 +14,8 @@ import (
|
|||||||
"gonum.org/v1/plot/vg"
|
"gonum.org/v1/plot/vg"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const preferredFontStyle = "Mono"
|
||||||
|
|
||||||
func plotAllDims(allStats []stats.Stats, fPrefix, fExt string) {
|
func plotAllDims(allStats []stats.Stats, fPrefix, fExt string) {
|
||||||
pWidth := 13 * vg.Centimeter
|
pWidth := 13 * vg.Centimeter
|
||||||
pHeight := 13 * vg.Centimeter
|
pHeight := 13 * vg.Centimeter
|
||||||
@ -25,8 +27,18 @@ func plotAllDims(allStats []stats.Stats, fPrefix, fExt string) {
|
|||||||
", G=" + fmt.Sprint(s.Generations) +
|
", G=" + fmt.Sprint(s.Generations) +
|
||||||
", I=" + fmt.Sprint(s.Iterations)
|
", I=" + fmt.Sprint(s.Iterations)
|
||||||
p.X.Label.Text = "Generations"
|
p.X.Label.Text = "Generations"
|
||||||
|
p.X.Label.TextStyle.Font.Variant = preferredFontStyle
|
||||||
|
p.X.Label.TextStyle.Font.Weight = 1 // Medium
|
||||||
p.Y.Label.Text = "CF value"
|
p.Y.Label.Text = "CF value"
|
||||||
|
p.Y.Label.TextStyle.Font.Variant = preferredFontStyle
|
||||||
|
p.Y.Label.TextStyle.Font.Weight = 1 // Medium
|
||||||
|
|
||||||
|
p.Title.TextStyle.Font.Size = 12.5
|
||||||
|
p.Title.TextStyle.Font.Weight = 2 // SemiBold
|
||||||
|
p.Title.Padding = 10 * vg.Millimeter
|
||||||
|
|
||||||
|
p.Legend.TextStyle.Font.Variant = preferredFontStyle
|
||||||
|
p.Legend.TextStyle.Font.Size = 8
|
||||||
p.Legend.Top = true
|
p.Legend.Top = true
|
||||||
p.Legend.Padding = 0 * vg.Centimeter
|
p.Legend.Padding = 0 * vg.Centimeter
|
||||||
p.Add(plotter.NewGrid())
|
p.Add(plotter.NewGrid())
|
||||||
|
Loading…
Reference in New Issue
Block a user