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

Function drawVector

plotter/field.go:163–173  ·  view source on GitHub ↗
(c vg.Canvas, v XY)

Source from the content-addressed store, hash-verified

161}
162
163func drawVector(c vg.Canvas, v XY) {
164 if math.Hypot(v.X, v.Y) == 0 {
165 return
166 }
167 // TODO(kortschak): Improve this arrow.
168 var pa vg.Path
169 pa.Move(vg.Point{})
170 pa.Line(vg.Point{X: 1, Y: 0})
171 pa.Close()
172 c.Stroke(pa)
173}
174
175// DataRange implements the DataRange method
176// of the plot.DataRanger interface.

Callers 1

PlotMethod · 0.85

Calls 4

MoveMethod · 0.95
LineMethod · 0.95
CloseMethod · 0.95
StrokeMethod · 0.65

Tested by

no test coverage detected