| Crates.io | sakz |
| lib.rs | sakz |
| version | 0.1.0 |
| created_at | 2025-02-09 11:25:24.918417+00 |
| updated_at | 2025-02-09 11:25:24.918417+00 |
| description | Fast and simple plotting library. |
| homepage | |
| repository | https://github.com/KaoruNishikawa/sakz |
| max_upload_size | |
| id | 1548895 |
| size | 74,504 |
Fast and simple plotting library.
cargo add sakz
# If you're using pip:
pip install sakz
# If you're using poetry:
poetry add sakz
# If you're using uv:
uv add sakz
use sakz;
use sakz::Plot;
use rand::Rng;
fn main() {
let mut rng = rand::thread_rng();
let x: Vec<f64> = (0..100).map(|_| rng.gen_range(0.0..10.0)).collect();
let y: Vec<f64> = (0..100).map(|_| rng.gen_range(0.0..10.0)).collect();
let data = x.iter().zip(y.iter()).map(|(x, y)| (*x, *y)).collect();
let mut fig = sakz::Figure::new("Test".to_string(), 2, sakz::CoordinateSystem::Cartesian);
let mut scatter = sakz::Scatter::new_2d(data);
scatter.color("#39f").marker_size(3.0);
_ = fig.plot(&scatter);
fig.save("example.svg").unwrap();
}
This library is using Semantic Versioning.