Histogram implements the Plotter interface, drawing a histogram of the data.
| 18 | // Histogram implements the Plotter interface, |
| 19 | // drawing a histogram of the data. |
| 20 | type Histogram struct { |
| 21 | // Bins is the set of bins for this histogram. |
| 22 | Bins []HistogramBin |
| 23 | |
| 24 | // Width is the width of each bin. |
| 25 | Width float64 |
| 26 | |
| 27 | // FillColor is the color used to fill each |
| 28 | // bar of the histogram. If the color is nil |
| 29 | // then the bars are not filled. |
| 30 | FillColor color.Color |
| 31 | |
| 32 | // LineStyle is the style of the outline of each |
| 33 | // bar of the histogram. |
| 34 | draw.LineStyle |
| 35 | |
| 36 | // LogY allows rendering with a log-scaled Y axis. |
| 37 | // When enabled, histogram bins with no entries will be discarded from |
| 38 | // the histogram's DataRange. |
| 39 | // The lowest Y value for the DataRange will be corrected to leave an |
| 40 | // arbitrary amount of height for the smallest bin entry so it is visible |
| 41 | // on the final plot. |
| 42 | LogY bool |
| 43 | } |
| 44 | |
| 45 | // NewHistogram returns a new histogram |
| 46 | // that represents the distribution of values |
nothing calls this directly
no outgoing calls
no test coverage detected