#plot #high-level #plotters #data #wrapper #idiomatic

dev 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

#112 in Visualization

Download history 19/week @ 2024-07-20 40/week @ 2024-07-27 21/week @ 2024-08-03 17/week @ 2024-08-10 10/week @ 2024-08-17 17/week @ 2024-08-24 13/week @ 2024-08-31 8/week @ 2024-09-07 9/week @ 2024-09-14 25/week @ 2024-09-21 16/week @ 2024-09-28 2/week @ 2024-10-05 20/week @ 2024-10-12 7/week @ 2024-10-19 6/week @ 2024-10-26 18/week @ 2024-11-02

52 downloads per month
Used in 12 crates (9 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

~4.5–6.5MB
~108K SLoC