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

Method GlyphBoxes

plotter/heat.go:258–274  ·  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

256// GlyphBoxes implements the GlyphBoxes method
257// of the plot.GlyphBoxer interface.
258func (h *HeatMap) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox {
259 c, r := h.GridXYZ.Dims()
260 b := make([]plot.GlyphBox, 0, r*c)
261 for i := range c {
262 for j := range r {
263 b = append(b, plot.GlyphBox{
264 X: plt.X.Norm(h.GridXYZ.X(i)),
265 Y: plt.Y.Norm(h.GridXYZ.Y(j)),
266 Rectangle: vg.Rectangle{
267 Min: vg.Point{X: -5, Y: -5},
268 Max: vg.Point{X: +5, Y: +5},
269 },
270 })
271 }
272 }
273 return b
274}

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