GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
KPLOT_ATTACH_SMOOTH(3) FreeBSD Library Functions Manual KPLOT_ATTACH_SMOOTH(3)

kplot_attach_smoothassign smoothed plot data to plotting context

library “libkplot”

#include <cairo.h>
#include <kplot.h>

int
kplot_attach_smooth(const struct kplot *p, struct kdata *d, enum kplottype t, const struct kdatacfg *cfg, enum ksmthtype smthtype, const struct ksmthcfg *smth);

The kplot_attach_smooth function assigns a smoothed data source d to a plotting context p, reference-counting the data source in the process. See kplot_attach_data(3) for details on the p, d, t, and cfg parameters. The remaining smthtype and smth configure smoothing options, which manipulate the data as it's being drawn. The following smoothing types are available:

Replace each point with the average of the surrounding movsamples points. If movsamples if not an odd number, it is increased by one. If the point is not surrounded completely by movsamples, say by being at the initial or trailing points of the data set, or the points surrounding are not valid numbers, then the point is not averaged.
Compute the empirical CDF from all valid points of the set. This will normalise the y-values to within the unit interval.
Normalise the y-values as probabilities of valid points of the set.

kplot_attach_smooth returns 0 if allocation of internal structures fails due to memory exhaustion. In this case, all allocations and references will be dropped.

kplot(3), kplot_attach_data(3), kplot_attach_datas(3)

The KSMOOTH_CDF an KSMOOTH_PMF has undefined behaviour for negative probabilities.

February 1, 2015 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.