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

Function plot_set_window_size

plot/plot.c:620–637  ·  view source on GitHub ↗

* @brief Set the desired window size in pixels. * * Updates the plot's @c width and @c height fields, which are used * both for the live raylib window opened by plot_draw() and for the * offscreen render target used by plot_export_image(). Either value * below 100 is silently clamped to 100 to avoid degenerate, hard-to- * read plots. * * @param plot Target plot. NULL is a no-op. * @para

Source from the content-addressed store, hash-verified

618 * @endcode
619 */
620bool plot_remove_series(Plot* plot, size_t seriesIndex) {
621 PLOT_LOG("[plot_remove_series]: enter (plot=%p, seriesIndex=%zu)", (void*)plot, seriesIndex);
622 if (!plot || seriesIndex >= plot->seriesCount) {
623 PLOT_LOG("[plot_remove_series]: bad arg or OOR -> false");
624 return false;
625 }
626
627 free(plot->series[seriesIndex].xData);
628 free(plot->series[seriesIndex].yData);
629 free((char*)plot->series[seriesIndex].label);
630
631 for (size_t i = seriesIndex; i + 1 < plot->seriesCount; ++i) {
632 plot->series[i] = plot->series[i + 1];
633 }
634 plot->seriesCount--;
635
636 PLOT_LOG("[plot_remove_series]: exit -> true (count=%zu)", plot->seriesCount);
637 return true;
638}
639
640

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected