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

Function plot_set_font_size

plot/plot.c:1965–1976  ·  view source on GitHub ↗

* @brief Set the pixel sizes used for the title and the axis labels. * * Overrides the defaults (title 28 px, axis labels 20 px). A non-positive * value leaves that size unchanged, so you can adjust just one. * * @param plot The plot. NULL is a no-op. * @param titleSize New title font size in pixels (<= 0 keeps the current value). * @param labelSize New axis-label font size in pixels (

Source from the content-addressed store, hash-verified

1963 * @param out Destination buffer, must point to at least @p n floats.
1964 * Must be non-NULL.
1965 *
1966 * @return true on success; false if @p out is NULL or @p n is 0.
1967 *
1968 * @note When @p start > @p end the step is negative and the values
1969 * descend — the function does not swap or sort.
1970 */
1971bool plot_linspace(float start, float end, size_t n, float* out) {
1972 PLOT_LOG("[plot_linspace]: enter (start=%g, end=%g, n=%zu)", (double)start, (double)end, n);
1973 if (!out || n == 0) {
1974 PLOT_LOG("[plot_linspace]: bad arg -> false");
1975 return false;
1976 }
1977 if (n == 1) {
1978 out[0] = start;
1979 PLOT_LOG("[plot_linspace]: exit -> true (n==1, single value)");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected