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

Function plot_series_stddev

plot/plot.c:2051–2076  ·  view source on GitHub ↗

* @brief Population standard deviation of a series' y-values. * * Companion to `plot_series_mean` / `plot_series_sum`. Uses the population * formula (divides by N). * * @param plot The plot. * @param index Series index. * @param out Receives the standard deviation. Must not be NULL. * @return `true` on success, `false` on bad arguments, an out-of-range index, * or an empty seri

Source from the content-addressed store, hash-verified

2049}
2050
2051
2052/**
2053 * @brief Dump every series of the plot to @p filename in CSV form.
2054 *
2055 * Writes a CSV file with one row per data point and one column per
2056 * series. The first column is named @c x and is built as follows:
2057 * - if the plot's first series has an explicit @c xData array, the
2058 * value at row r is taken from `series[0].xData[r]`;
2059 * - otherwise the integer row index r is written (matching the
2060 * implicit-index convention used by the renderer).
2061 *
2062 * Subsequent columns are the @c yData values of each series in
2063 * insertion order; the column header is the series' label, or
2064 * `series_N` (where N is the index) when the label is NULL or empty.
2065 *
2066 * If series have different lengths, the file uses the longest series
2067 * as the row count and leaves shorter series' missing cells empty
2068 * ("ragged CSV"). When the series do NOT share one set of x values (a
2069 * scatter series with its own x array), every series gets its own x
2070 * column instead: `x_<label>,<label>,...` (only the first series' x used
2071 * to be written). Numbers use `%.9g` (exact for float; `%g` kept 6
2072 * digits), and labels are quoted per RFC 4180 when they contain a comma,
2073 * quote or line break.
2074 *
2075 * Suitable for hand-off to spreadsheets, Pandas, or any other
2076 * downstream tool that wants the raw data the plot is showing.
2077 *
2078 * @param plot Source plot. Must be non-NULL and contain at least
2079 * one series.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected