Пример #1
0
// Thumbnail the thumbnail for the Scatter,
// implementing the plot.Thumbnailer interface.
func (pts *Scatter) Thumbnail(da *plot.DrawArea) {
	da.DrawGlyph(pts.GlyphStyle, da.Center())
}
Пример #2
0
// Plot draws the Scatter, implementing the plot.Plotter
// interface.
func (pts *Scatter) Plot(da plot.DrawArea, plt *plot.Plot) {
	trX, trY := plt.Transforms(&da)
	for _, p := range pts.XYs {
		da.DrawGlyph(pts.GlyphStyle, plot.Pt(trX(p.X), trY(p.Y)))
	}
}