#f64 #high-level #let

complot

An idiomatic high-level wrapper to Rust plotters visualization crate

8 releases

0.3.4 Jul 11, 2023
0.3.3 May 19, 2022
0.3.2 Dec 29, 2021
0.3.1 Oct 31, 2021
0.1.1 Oct 7, 2021

#71 in Visualization

Download history 50/week @ 2023-10-17 45/week @ 2023-10-24 56/week @ 2023-10-31 43/week @ 2023-11-07 44/week @ 2023-11-14 57/week @ 2023-11-21 73/week @ 2023-11-28 64/week @ 2023-12-05 36/week @ 2023-12-12 66/week @ 2023-12-19 48/week @ 2023-12-26 31/week @ 2024-01-02 67/week @ 2024-01-09 57/week @ 2024-01-16 41/week @ 2024-01-23 61/week @ 2024-01-30

235 downloads per month
Used in 10 crates (7 directly)

MIT license

47KB
1K SLoC

COMPLOT: An idiomatic high-level wrapper to Rust plotters visualization crate


lib.rs:

Complot is an idiomatic high-level wrapper to Rust plotters visualization crate. Complot allows to quickly visually inspect data without any other knowledge than the Rust standard library. Complot relies on Rust traits from the standard libray to produce the plots and on a simple tree of structures to configure the plots.

Example

Plotting sine and cosine functions

(0..100).map(|k| {
                  let o = 5.*std::f64::consts::PI*k as f64/100.;
                  let (s,c) = o.sin_cos();
                  (o,vec![s,c])
                 }).collect::<complot::Plot>();

Plotting sine and cosine functions with custom properties

let _: complot::Plot = (
 (0..100).map(|k| {
                    let o = 5.*std::f64::consts::PI*k as f64/100.;
                    let (s,c) = o.sin_cos();
                    (o,vec![s,c])
                   }),
 complot::complot!("sin_cos.svg", xlabel="x label", ylabel= "y label")
                       ).into();

Dependencies

~14MB
~111K SLoC