fix(plot): single-rounding clock labels, log-axis fits that refuse non-positive data
This commit is contained in:
1 parent
93fc06f050
commit
606e40a9f1
7 files changed
+258
-73
No files matched your search
@@ -38,8 +38,18 @@ enum class TickFormat {
|
||||
void format_si(f64 v, char* buf, usize n, const char* unit = nullptr);
|
||||
|
||||
/// Writes `seconds` as a compact clock string to `buf`, NUL-terminated and never
|
||||
/// past `n` bytes. Shapes: `500ms`, `1.5s`, `1:30`, `1:00:00`, `2.5d`; negatives
|
||||
/// keep their sign. A non-finite value falls back to `"%.3g"`.
|
||||
/// past `n` bytes. Negatives keep their sign; a non-finite value falls back to
|
||||
/// `"%.3g"`.
|
||||
///
|
||||
/// The whole value is rounded to a single whole-second count first and every
|
||||
/// field is derived from that one number, so no field can ever reach its radix:
|
||||
/// 119.5 s is `2:00`, not `1:60`, and 3599.5 s is `1:00:00`.
|
||||
///
|
||||
/// Shapes, by magnitude: below 1 s `500ms`; below 60 s `1.5s`; below 1 h `1:30`;
|
||||
/// at or above 24 h, as a decimal day count `2.5d`. Between 1 h and 24 h the
|
||||
/// shape is `1:01:01` -- and because a value that rounds up to 24 h takes the day
|
||||
/// shape, the hour field of that shape is always below 24. The 60 s and 1 h
|
||||
/// boundaries are inclusive of the rounded value: 59.5 s is `1:00`.
|
||||
void format_time(f64 seconds, char* buf, usize n);
|
||||
|
||||
/// The hard cap on `generate_ticks` output, minor ticks included. A range dense
|
||||
|
||||
Reference in new issue
Block a user