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

Function plot_set_axis_labels

plot/plot.c:994–1019  ·  view source on GitHub ↗

* @brief Replace both axis labels in one call. * * Allocates fresh copies of @p xLabel and @p yLabel first; only if * both allocations succeed does the function free the previous labels * and install the new ones. This all-or-nothing strategy guarantees * that the plot is never left in a half-updated state. * * Passing NULL for either argument is allowed and stores the empty * string "" so

Source from the content-addressed store, hash-verified

992 CloseWindow();
993 SetTraceLogLevel(LOG_INFO);
994 }
995
996 PLOT_LOG("[plot_export_image]: exit -> %s (file=%s)", ok ? "true" : "false", filename);
997 return ok;
998}
999
1000
1001/**
1002 * @brief Build an opaque PlotColor from three 8-bit channels.
1003 *
1004 * Convenience wrapper over plot_color() that hard-codes the alpha
1005 * channel to 255 (fully opaque). Use plot_color() directly when you
1006 * need a translucent colour — for instance, a semi-transparent legend
1007 * background.
1008 *
1009 * @param r Red channel, 0..255.
1010 * @param g Green channel, 0..255.
1011 * @param b Blue channel, 0..255.
1012 *
1013 * @return PlotColor value with the requested RGB and alpha = 255. The
1014 * function never fails.
1015 *
1016 * @code
1017 * PlotColor accent = plot_color_rgb(255, 99, 71); // tomato red
1018 * plot_set_series_color(plot, 0, accent);
1019 * @endcode
1020 */
1021PlotColor plot_color_rgb(unsigned char r, unsigned char g, unsigned char b) {
1022 PLOT_LOG("[plot_color_rgb]: enter (r=%u, g=%u, b=%u)", (unsigned)r, (unsigned)g, (unsigned)b);

Callers

nothing calls this directly

Calls 1

p_strdupFunction · 0.85

Tested by

no test coverage detected