axis_labels_rs 0.4.0

Optimally readable axis labels for terminal plots.
Documentation
  • Coverage
  • 25%
    2 out of 8 items documented0 out of 5 items with examples
  • Size
  • Source code size: 26.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 386.9 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • olavolav/axis_labels_rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • olavolav

axis_labels_rs

crates.io

This is a library to compute optimally readable axis labels for terminal plots. The code is based on the axis_labels code of the Python plotting library uniplot.

It is implemented in Rust for performance reasons, since finding optimal axis labels is done by testing & scoring a large number of possible labels.

Example

use axis_labels_rs::float_axis_labels;

let labels = float_axis_labels(0.0, 123.4, 60, 1, false, &String::from(" m"));
println!("{}", labels);

yields

0 m                    50 m                    100 m