Crates.io | textplots |
lib.rs | textplots |
version | 0.8.6 |
source | src |
created_at | 2018-05-20 09:57:47.036233 |
updated_at | 2024-01-28 09:20:06.07194 |
description | Terminal plotting library. |
homepage | |
repository | https://github.com/loony-bean/textplots-rs |
max_upload_size | |
id | 66302 |
size | 275,836 |
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!
use textplots::{Chart, Plot, Shape};
fn main() {
println!("y = sin(x) / x");
Chart::default()
.lineplot(&Shape::Continuous(Box::new(|x| x.sin() / x)))
.display();
}
textplots '10*x + x^2 + 10*sin(x)*abs(x)' --xmin=-20 --xmax=20
cargo build
cargo build --bin --release textplots --features="tool"