16 releases

0.6.0 Apr 4, 2021
0.5.4 Nov 24, 2020
0.5.3 Sep 8, 2020
0.5.1 Apr 18, 2020
0.3.0 Jun 28, 2018

#10 in Visualization

Download history 199/week @ 2020-12-22 177/week @ 2020-12-29 194/week @ 2021-01-05 265/week @ 2021-01-12 644/week @ 2021-01-19 519/week @ 2021-01-26 558/week @ 2021-02-02 446/week @ 2021-02-09 669/week @ 2021-02-16 354/week @ 2021-02-23 384/week @ 2021-03-02 477/week @ 2021-03-09 310/week @ 2021-03-16 321/week @ 2021-03-23 219/week @ 2021-03-30 412/week @ 2021-04-06

1,764 downloads per month
Used in less than 7 crates

MIT license

140KB
289 lines

textplots Crates.io Build Status

Terminal plotting library for using in Rust CLI applications. Should work well in any unicode terminal with monospaced font.

It is inspired by TextPlots.jl which is inspired by Drawille.

Currently it features only drawing line charts on Braille canvas, but could be extended to support other canvas and chart types just like UnicodePlots.jl or another cool terminal plotting library.

Contributions are very much welcome!

Usage

Using as a library

use textplots::{Chart, Plot, Shape};

fn main() {
    println!("y = sin(x) / x");
    
    Chart::default()
        .lineplot(&Shape::Continuous(Box::new(|x| x.sin() / x)))
        .display();
}

Using as a binary

$ textplots '10*x + x^2 + 10*sin(x)*abs(x)' --xmin=-20 --xmax=20

Dependencies

~3MB
~53K SLoC