コード例 #1
0
ファイル: scatter.go プロジェクト: Tradnaiofh/plotinum
// 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
ファイル: scatter.go プロジェクト: Tradnaiofh/plotinum
// 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)))
	}
}