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

Function plot_add_bar

plot/plot.c:1317–1320  ·  view source on GitHub ↗

* @brief Add a bar-chart series whose x axis is implicitly 0..n-1. * * Convenience wrapper around plot_add_series() that fixes @c xData to * NULL and @c pltype to PLTYPE_BAR. The renderer draws one vertical * rectangle per sample, centred on the sample's x position and * stretching from the x axis up (or down) to its y value. Each bar * is outlined in the plot's axis colour for contrast. *

Source from the content-addressed store, hash-verified

1315 * @endcode
1316 */
1317int plot_add_bar(Plot* plot, const float* y, size_t n, const char* label, PlotColor color) {
1318 PLOT_LOG("[plot_add_bar]: enter (plot=%p, n=%zu, label=%s)", (void*)plot, n, label ? label : "(null)");
1319 return plot_add_series(plot, NULL, y, n, label, PLTYPE_BAR, color);
1320}
1321
1322
1323/**

Callers

nothing calls this directly

Calls 1

plot_add_seriesFunction · 0.85

Tested by

no test coverage detected