NewQuartPlot returns a new QuartPlot that represents the distribution of the given values. An error is returned if the plot is created with no values. The fence values are 1.5x the interquartile before the first quartile and after the third quartile. Any value that is outside of the fences are dr
(loc float64, values Valuer)
| 67 | // whiskers stretch) are the minimum and maximum |
| 68 | // values that are not outside the fences. |
| 69 | func NewQuartPlot(loc float64, values Valuer) (*QuartPlot, error) { |
| 70 | b := new(QuartPlot) |
| 71 | var err error |
| 72 | if b.fiveStatPlot, err = newFiveStat(0, loc, values); err != nil { |
| 73 | return nil, err |
| 74 | } |
| 75 | |
| 76 | b.MedianStyle = DefaultQuartMedianStyle |
| 77 | b.WhiskerStyle = DefaultQuartWhiskerStyle |
| 78 | |
| 79 | return b, err |
| 80 | } |
| 81 | |
| 82 | // Plot draws the QuartPlot on Canvas c and Plot plt. |
| 83 | func (b *QuartPlot) Plot(c draw.Canvas, plt *plot.Plot) { |