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

Function plot_has_series

plot/plot.c:1132–1139  ·  view source on GitHub ↗

* @brief Whether @p index addresses a valid series. * * Performs a bounds check against the plot's current series count. * Functionally equivalent to `(index < plot_get_series_count(plot))` * but also handles a NULL @p plot pointer gracefully. * * @param plot Plot to query. May be NULL. * @param index Zero-based series index to test. * * @return true if @p plot is non-NULL and @p index i

Source from the content-addressed store, hash-verified

1130 *
1131 * @code
1132 * plot_set_axis_labels(plot, "Time (s)", "Voltage (mV)");
1133 * @endcode
1134 */
1135bool plot_set_axis_labels(Plot* plot, const char* xLabel, const char* yLabel) {
1136 PLOT_LOG("[plot_set_axis_labels]: enter (plot=%p, xLabel=%s, yLabel=%s)", (void*)plot, xLabel ? xLabel : "(null)", yLabel ? yLabel : "(null)");
1137 if (!plot) {
1138 PLOT_LOG("[plot_set_axis_labels]: NULL plot -> false");
1139 return false;
1140 }
1141
1142 char* x = p_strdup(xLabel ? xLabel : "");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected