(c draw.Canvas, plt *plot.Plot)
| 197 | type horizQuartPlot struct{ *QuartPlot } |
| 198 | |
| 199 | func (b horizQuartPlot) Plot(c draw.Canvas, plt *plot.Plot) { |
| 200 | trX, trY := plt.Transforms(&c) |
| 201 | y := trY(b.Location) |
| 202 | if !c.ContainsY(y) { |
| 203 | return |
| 204 | } |
| 205 | y += b.Offset |
| 206 | |
| 207 | med := vg.Point{X: trX(b.Median), Y: y} |
| 208 | q1 := trX(b.Quartile1) |
| 209 | q3 := trX(b.Quartile3) |
| 210 | aLow := trX(b.AdjLow) |
| 211 | aHigh := trX(b.AdjHigh) |
| 212 | |
| 213 | c.StrokeLine2(b.WhiskerStyle, aHigh, y, q3, y) |
| 214 | if c.ContainsX(med.X) { |
| 215 | c.DrawGlyphNoClip(b.MedianStyle, med) |
| 216 | } |
| 217 | c.StrokeLine2(b.WhiskerStyle, aLow, y, q1, y) |
| 218 | |
| 219 | ostyle := b.MedianStyle |
| 220 | ostyle.Radius = b.MedianStyle.Radius / 2 |
| 221 | for _, out := range b.Outside { |
| 222 | x := trX(b.Value(out)) |
| 223 | if c.ContainsX(x) { |
| 224 | c.DrawGlyphNoClip(ostyle, vg.Point{X: x, Y: y}) |
| 225 | } |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | // DataRange returns the minimum and maximum x |
| 230 | // and y values, implementing the plot.DataRanger |
nothing calls this directly
no test coverage detected