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

Method GlyphBoxes

plotter/boxplot.go:392–406  ·  view source on GitHub ↗

GlyphBoxes returns a slice of GlyphBoxes for the points and for the median line of the boxplot, implementing the plot.GlyphBoxer interface

(plt *plot.Plot)

Source from the content-addressed store, hash-verified

390// points and for the median line of the boxplot,
391// implementing the plot.GlyphBoxer interface
392func (b horizBoxPlot) GlyphBoxes(plt *plot.Plot) []plot.GlyphBox {
393 bs := make([]plot.GlyphBox, len(b.Outside)+1)
394 for i, out := range b.Outside {
395 bs[i].X = plt.X.Norm(b.Value(out))
396 bs[i].Y = plt.Y.Norm(b.Location)
397 bs[i].Rectangle = b.GlyphStyle.Rectangle()
398 }
399 bs[len(bs)-1].X = plt.X.Norm(b.Median)
400 bs[len(bs)-1].Y = plt.Y.Norm(b.Location)
401 bs[len(bs)-1].Rectangle = vg.Rectangle{
402 Min: vg.Point{Y: b.Offset - (b.Width/2 + b.BoxStyle.Width/2)},
403 Max: vg.Point{Y: b.Offset + (b.Width/2 + b.BoxStyle.Width/2)},
404 }
405 return bs
406}
407
408// OutsideLabels returns a *Labels that will plot
409// 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