KPLOT_DATA_ATTACH(3) Library Functions Manual KPLOT_DATA_ATTACH(3)

NAME

kplot_data_attachassign plot data to plotting context

LIBRARY

library “libkplot”

SYNOPSIS

#include <cairo.h>
#include <kplot.h>
int
kplot_data_attach(const struct kplot *p, struct kdata *d, enum kplottype t, const struct kdatacfg *cfg);

DESCRIPTION

The kplot_data_attach function assigns a data source d to a plotting context p, reference-counting the data source in the process. The plot style assigned to the plot is t. The options provided via the cfg object are as follows:
point
The configuration for KPLOT_POINTS plots.
extrema
A bit-field allowing arbitrary assignment of xy-ranges: EXTREMA_XMIN, EXTREMA_XMAX, EXTREMA_YMIN, and/or EXTREMA_YMAX.
extrema_xmin
If EXTREMA_XMIN is set, this value will be used instead of a value computed from the data.
extrema_xmax
See extrema_xmin.
extrema_ymin
See extrema_xmin.
extrema_ymax
See extrema_xmin.
line
The configuration for KPLOT_LINES types.
If NULL is passed as a configuration, reasonable defaults are used.

RETURN VALUES

kplot_data_attach returns 0 if allocation of internal structures fails due to memory exhaustion.

SEE ALSO

kplot(3)
January 22, 2015 OpenBSD 5.6