kdata_bucket_alloc —
allocate bucket data for plotting
#include <cairo.h>
#include <kplot.h>
struct kdata *
kdata_bucket_alloc(size_t rmin,
size_t rmax);
The kdata_bucket_alloc function creates a
reference-counted data sources for
kplot(3),
initially with x-values set to the pair index starting at
rmin and y-values to zero. It is similar to
kdata_array_alloc(3)
except it uses a bucket data model: each integer within the range
rmin (inclusive) to rmax
(non-inclusive) corresponds to a specific bucket. Bucket values are modified
with
kdata_bucket_add(3)
and
kdata_bucket_set(3).
kdata_bucket_alloc returns
NULL if memory allocation failed.