MCPcopy
hub / github.com/gonum/plot / Plot

Method Plot

plotter/scatter.go:43–52  ·  view source on GitHub ↗

Plot draws the Scatter, implementing the plot.Plotter interface.

(c draw.Canvas, plt *plot.Plot)

Source from the content-addressed store, hash-verified

41// Plot draws the Scatter, implementing the plot.Plotter
42// interface.
43func (pts *Scatter) Plot(c draw.Canvas, plt *plot.Plot) {
44 trX, trY := plt.Transforms(&c)
45 glyph := func(i int) draw.GlyphStyle { return pts.GlyphStyle }
46 if pts.GlyphStyleFunc != nil {
47 glyph = pts.GlyphStyleFunc
48 }
49 for i, p := range pts.XYs {
50 c.DrawGlyph(glyph(i), vg.Point{X: trX(p.X), Y: trY(p.Y)})
51 }
52}
53
54// DataRange returns the minimum and maximum
55// x and y values, implementing the plot.DataRanger

Callers

nothing calls this directly

Calls 2

TransformsMethod · 0.80
DrawGlyphMethod · 0.65

Tested by

no test coverage detected