kdata_mean_attach —
    attach source for mean data plotting
#include <cairo.h>
  
  #include <kplot.h>
int
  
  kdata_mean_attach(struct kdata
    *dst, struct kdata *source);
The kdata_mean_attach function attaches a
    data source source to a mean data source
    dst allocated with
    kdata_mean_alloc(3).
    The internal buffers will be increased, if necessary, to the size of the new
    buffer. If the buffer is increased, the mean values of the new buckets are
    set to zero. The x-values of the new pairs are set to the new source's
    x-values.
Passing NULL as
    source will simply return.
kdata_mean_attach returns 0 if memory
    allocation failed or if dst was not allocated with
    kdata_mean_alloc(3).
kdata_mean_alloc(3),
    kplot(3)
Donald E. Knuth,
    The Art of Computer Programming: Seminumerical Algorithms,
    3rd Edition, Addison-Wesley, Volume
    2, 232, Boston,
    1998.
If you attach multiple sources with different x-values, the mean
    x-values will be inconsistent.