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

Method GlyphBoxes

plotter/quartile.go:238–254  ·  view source on GitHub ↗

GlyphBoxes returns a slice of GlyphBoxes for the plot, implementing the plot.GlyphBoxer interface.

(plt *plot.Plot)

Source from the content-addressed store, hash-verified

236// GlyphBoxes returns a slice of GlyphBoxes for the plot,
237// implementing the plot.GlyphBoxer interface.
238func (b horizQuartPlot) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox {
239 bs := make([]plot.GlyphBox, len(b.Outside)+1)
240
241 ostyle := b.MedianStyle
242 ostyle.Radius = b.MedianStyle.Radius / 2
243 for i, out := range b.Outside {
244 bs[i].X = plt.X.Norm(b.Value(out))
245 bs[i].Y = plt.Y.Norm(b.Location)
246 bs[i].Rectangle = ostyle.Rectangle()
247 bs[i].Rectangle.Min.Y += b.Offset
248 }
249 bs[len(bs)-1].X = plt.X.Norm(b.Median)
250 bs[len(bs)-1].Y = plt.Y.Norm(b.Location)
251 bs[len(bs)-1].Rectangle = b.MedianStyle.Rectangle()
252 bs[len(bs)-1].Rectangle.Min.Y += b.Offset
253 return bs
254}
255
256// OutsideLabels returns a *Labels that will plot
257// a label for each of the outside points. The

Callers

nothing calls this directly

Calls 3

NormMethod · 0.80
ValueMethod · 0.65
RectangleMethod · 0.45

Tested by

no test coverage detected