In Tk, this is based on BLT's barchart. The number of bins is fixed at creation time, then the user hands the Histogram an array of datapoints (double or int) to display (or optionally an array of datapoints and locations where the bars should be drawn (specified as doubles).
- setBinCount: (unsigned)n Set the number of bins to use (bars to draw).
Phase: Using
- (void)setupActiveItemInfo
- (void)setupActiveOutlierMarker
- (void)setupZoomStack
- (void)drawHistogramWithDouble: (double *)points Draw the (double) data in the histogram.
- (void)drawHistogramWithDouble: (double *)pointsatLocations: (double *)locations Draw the (double) data in the histogram at particular offsets.
- (void)drawHistogramWithInt: (int *)points Draw the (integer) data in the histogram.
- (void)drawHistogramWithInt: (int *)pointsatLocations: (double *)locations Draw the (integer) data in the histogram at particular offsets.
- (void)hideLegend Hide the legend on the histogram.
- (void)setActiveOutlierText: (unsigned)outlierscount: (unsigned)count Set the text that describes a specified number of outliers.
- setAxisLabelsX: (const char *)xlY: (const char *)yl Set the axis labels.
- (void)setXaxisMin: (double)minmax: (double)maxstep: (double)step Set the X range and step size for the histogram. Display three significant figures for the major-tick labels.
- (void)setXaxisMin: (double)minmax: (double)maxstep: (double)stepprecision: (unsigned)precision Set the X range, step size, and number of major-tick-label significant figures for the histogram.
- (void)setBarWidth: (double)step Set the width of the bars.
- setTitle: (const char *)title Set the title of the histogram.
- (void)setLabels: (const char * const *)lcount: (unsigned)count Set labels for the histogram bars. If not set, they remain blank. Labels are arrays of strings, one per bin/bar.
- (void)setColors: (const char * const *)ccount: (unsigned)count Set colors for the histogram bars. If not set, all are blue. Colors are arrays of strings (one per bin/bar) of color names.