MCPcopy Create free account
hub / github.com/KaisenAmin/c_std / plot_add_pie

Function plot_add_pie

plot/plot.c:2011–2014  ·  view source on GitHub ↗

* @brief Add a pie-chart series (convenience wrapper for `PLTYPE_PIE`). * * Each value becomes a slice sized in proportion to the total. Equivalent to * `plot_add_series(plot, NULL, values, n, label, PLTYPE_PIE, color)`. * * @param plot The plot. * @param values Slice magnitudes (non-negative). * @param n Number of slices. * @param label Series label (copied by the plot). May be NU

Source from the content-addressed store, hash-verified

2009 * @return The new series index, or -1 on failure.
2010 */
2011int plot_add_pie(Plot* plot, const float* values, size_t n, const char* label, PlotColor color) {
2012 PLOT_LOG("[plot_add_pie]: enter (plot=%p, n=%zu)", (void*)plot, n);
2013 return plot_add_series(plot, NULL, values, n, label, PLTYPE_PIE, color);
2014}
2015
2016
2017/**

Callers

nothing calls this directly

Calls 1

plot_add_seriesFunction · 0.85

Tested by

no test coverage detected