* @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
| 1130 | * |
| 1131 | * @code |
| 1132 | * plot_set_axis_labels(plot, "Time (s)", "Voltage (mV)"); |
| 1133 | * @endcode |
| 1134 | */ |
| 1135 | bool 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 : ""); |
nothing calls this directly
no outgoing calls
no test coverage detected