| Crates.io | axis-ticks |
| lib.rs | axis-ticks |
| version | 0.1.0 |
| created_at | 2020-09-24 21:12:40.191538+00 |
| updated_at | 2020-09-24 21:12:40.191538+00 |
| description | Generates an array of nicely rounded values between two numbers for which are ideal for positioning axis labels and grid-lines |
| homepage | |
| repository | https://github.com/timfish/axis-ticks |
| max_upload_size | |
| id | 292663 |
| size | 9,613 |
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]
);