From b4849ccab46cf3f55f109436153e45a175888792 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 14 Apr 2020 11:07:07 +0100 Subject: Remove unused PreprocPattern, allow sensible defaults with aws setup, and add a little more documentation --- graph.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'graph.go') diff --git a/graph.go b/graph.go index 8d6c857..a7b46bc 100644 --- a/graph.go +++ b/graph.go @@ -32,6 +32,8 @@ type GraphConf struct { Pgnum, Conf float64 } +// createLine creates a horizontal line with a particular y value for +// a graph func createLine(xvalues []float64, y float64, c drawing.Color) chart.ContinuousSeries { var yvalues []float64 for range xvalues { @@ -46,10 +48,12 @@ func createLine(xvalues []float64, y float64, c drawing.Color) chart.ContinuousS } } +// Graph creates a graph of the confidence of each page in a book func Graph(confs map[string]*Conf, bookname string, w io.Writer) error { return GraphOpts(confs, bookname, "Page number", true, w) } +// Graph creates a graph of confidences func GraphOpts(confs map[string]*Conf, bookname string, xaxis string, guidelines bool, w io.Writer) error { if len(confs) < 2 { return errors.New("Not enough valid confidences") -- cgit v1.2.1-24-ge1ad