MCPcopy Index your code
hub / github.com/gonum/plot / lines

Function lines

vg/vg_test.go:88–104  ·  view source on GitHub ↗
(w vg.Length)

Source from the content-addressed store, hash-verified

86}
87
88func lines(w vg.Length) (*plot.Plot, error) {
89 p := plot.New()
90 pts := plotter.XYs{
91 {X: 0, Y: 0}, {X: 0, Y: 1},
92 {X: 1, Y: 0}, {X: 1, Y: 1},
93 }
94 line, err := plotter.NewLine(pts)
95 if err != nil {
96 return nil, err
97 }
98 line.Width = w
99 p.Add(line)
100 p.X.Label.Text = "X label"
101 p.Y.Label.Text = "Y label"
102
103 return p, nil
104}
105
106func TestParseLength(t *testing.T) {
107 for _, table := range []struct {

Callers 1

TestLineWidthFunction · 0.85

Calls 3

NewFunction · 0.92
NewLineFunction · 0.92
AddMethod · 0.45

Tested by

no test coverage detected