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

Method GlyphBoxes

plotter/field.go:200–216  ·  view source on GitHub ↗

GlyphBoxes implements the GlyphBoxes method of the plot.GlyphBoxer interface.

(plt *plot.Plot)

Source from the content-addressed store, hash-verified

198// GlyphBoxes implements the GlyphBoxes method
199// of the plot.GlyphBoxer interface.
200func (f *Field) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox {
201 c, r := f.FieldXY.Dims()
202 b := make([]plot.GlyphBox, 0, r*c)
203 for i := range c {
204 for j := range r {
205 b = append(b, plot.GlyphBox{
206 X: plt.X.Norm(f.FieldXY.X(i)),
207 Y: plt.Y.Norm(f.FieldXY.Y(j)),
208 Rectangle: vg.Rectangle{
209 Min: vg.Point{X: -5, Y: -5},
210 Max: vg.Point{X: +5, Y: +5},
211 },
212 })
213 }
214 }
215 return b
216}

Callers

nothing calls this directly

Calls 4

NormMethod · 0.80
DimsMethod · 0.65
XMethod · 0.65
YMethod · 0.65

Tested by

no test coverage detected