axis-ticks 0.1.0

Generates an array of nicely rounded values between two numbers for which are ideal for positioning axis labels and grid-lines
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 9.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.17 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • timfish/axis-ticks
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • timfish

axis-ticks

A port of d3-ticks, part of the JavaScript D3 plotting library.

Generates an array of nicely rounded values between two numbers for which are ideal for positioning axis labels and grid-lines.

let ticks = axis_ticks::ticks(-0.125, 0.25, 10);

assert_eq!(
    ticks,
    [-0.15, -0.1, -0.05, 0.0, 0.05, 0.1, 0.15, 0.2, 0.25]
);