Plot draws the Scatter, implementing the plot.Plotter interface.
(c draw.Canvas, plt *plot.Plot)
| 41 | // Plot draws the Scatter, implementing the plot.Plotter |
| 42 | // interface. |
| 43 | func (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 |
nothing calls this directly
no test coverage detected