go(report): handle 'comparison of means' plots
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
805db5088b
commit
37d761bf81
@ -7,6 +7,7 @@ import (
|
||||
_ "embed"
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"text/template"
|
||||
"time"
|
||||
)
|
||||
@ -35,8 +36,16 @@ var (
|
||||
func SaveTexAllPics() {
|
||||
a := allPics
|
||||
texAllPicsFile := GetTexDir() + "allpics" + ".tex"
|
||||
r := regexp.MustCompile(`^Comparison of Algo Means`)
|
||||
tmplAllPics := template.New("allpics").Funcs(
|
||||
template.FuncMap{
|
||||
"isComparison": func(s string) bool {
|
||||
matches := r.FindAllString(s, -1)
|
||||
|
||||
tmplAllPics := template.New("allpics")
|
||||
return matches != nil
|
||||
},
|
||||
},
|
||||
)
|
||||
tmplAllPics = template.Must(tmplAllPics.Parse(string(tmplAllPicsFile)))
|
||||
|
||||
f, err := os.Create(texAllPicsFile)
|
||||
|
@ -9,7 +9,11 @@
|
||||
|
||||
\section{Plot comparisons}
|
||||
{{ range $i, $v := .AllPics.TexFiles }}
|
||||
{{ if isComparison $v.Algo }}
|
||||
\section{ {{- $v.Algo -}} }
|
||||
{{- else -}}
|
||||
\subsection{ {{- $v.Algo -}} }
|
||||
{{ end -}}
|
||||
{{- range $j, $u := $v.FilePaths }}
|
||||
\input{ {{- printf "{%s}" $u -}} }
|
||||
\newpage
|
||||
|
Loading…
Reference in New Issue
Block a user