Histogram
Name
Histogram -- Histogram display tool.
Description
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).
Methods
Phase: Creating
-
setBinCount: (unsigned)
n Set the number of bins to use (bars to draw).
Phase: Using
- (void)
setupActiveItemInfo- (void)
setupActiveOutlierMarker- (void)
drawHistogramWithDouble: (double *)
points Draw the (double) data in the histogram.
- (void)
drawHistogramWithDouble: (double *)
points atLocations: (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 *)
points atLocations: (double *)
locations Draw the (integer) data in the histogram at particular offsets.
- (void)
hideLegend Hide the legend on the histogram.
- (void)
setActiveOutlierText: (unsigned)
outliers count: (unsigned)
count Set the text that describes a specified number of outliers.
-
setAxisLabelsX: (const char *)
xl Y: (const char *)
yl Set the axis labels.
- (void)
setXaxisMin: (double)
min max: (double)
max step: (double)
step Set the X range and step size for the histogram. Display three significant figures for the major-tick labels.
- (void)
setXaxisMin: (double)
min max: (double)
max step: (double)
step precision: (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 *)
l count: (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 *)
c count: (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.