KDATA_VECTOR_ADD(3) Library Functions Manual KDATA_VECTOR_ADD(3)

NAME

kdata_vector_append, kdata_vector_setmodify data of a vector data source

LIBRARY

library “libkplot”

SYNOPSIS

#include <cairo.h>
#include <kplot.h>
int
kdata_vector_append(struct kdata *data, double x, double y);
int
kdata_vector_set(struct kdata *data, size_t pos, double x, double y);

DESCRIPTION

The kdata_vector_append function sets the x and y values the pairs at pos, or in the event of kdata_vector_append, after growing vector data source allocated with kdata_vector_alloc(3).

RETURN VALUES

kdata_vector_append returns 0 if the vector reallocation failed, the data source was not created with kdata_vector_alloc(3), or if dependent data sources fail. Otherwise it returns non-zero.

SEE ALSO

kdata_vector_alloc(3), kplot(3)
February 7, 2015 OpenBSD 5.8