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

Function NewLine

plotter/line.go:52–61  ·  view source on GitHub ↗

NewLine returns a Line that uses the default line style and does not draw glyphs.

(xys XYer)

Source from the content-addressed store, hash-verified

50// NewLine returns a Line that uses the default line style and
51// does not draw glyphs.
52func NewLine(xys XYer) (*Line, error) {
53 data, err := CopyXYs(xys)
54 if err != nil {
55 return nil, err
56 }
57 return &Line{
58 XYs: data,
59 LineStyle: DefaultLineStyle,
60 }, nil
61}
62
63// Plot draws the Line, implementing the plot.Plotter interface.
64func (pts *Line) Plot(c draw.Canvas, plt *plot.Plot) {

Callers 15

ExampleScatterFunction · 0.92
Example_rotationFunction · 0.92
ExampleLine_stepLineFunction · 0.92
clippedFilledLineFunction · 0.92
ExampleLine_filledLineFunction · 0.92
ExampleFunction · 0.92
AddStackedAreaPlotsFunction · 0.92
AddLinesFunction · 0.92
linesFunction · 0.92
TestIssue687Function · 0.92
TestEmbedFontsFunction · 0.92

Calls 1

CopyXYsFunction · 0.85

Tested by 14

ExampleScatterFunction · 0.74
Example_rotationFunction · 0.74
ExampleLine_stepLineFunction · 0.74
clippedFilledLineFunction · 0.74
ExampleLine_filledLineFunction · 0.74
ExampleFunction · 0.74
linesFunction · 0.74
TestIssue687Function · 0.74
TestEmbedFontsFunction · 0.74
Example_embedFontsFunction · 0.74
Example_multipageFunction · 0.74