GlyphBoxes returns a slice of GlyphBoxes for the plot, implementing the plot.GlyphBoxer interface.
(plt *plot.Plot)
| 236 | // GlyphBoxes returns a slice of GlyphBoxes for the plot, |
| 237 | // implementing the plot.GlyphBoxer interface. |
| 238 | func (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 |