termplot
An extensible plotting library for CLI applications.
Documentation
Find the full documentation on doc.rs
Quick start
To use termplot
, add the crate to your Cargo.toml
.
[]
= "0.1.0"
Examples
Plotting a function
Here is a quick example of what plotting sin(x) / x
looks like.
use *;
let mut plot = default;
plot.set_domain
.set_codomain
.set_title
.set_x_label
.set_y_label
.set_size
.add_plot;
println!;
Output of the previous example:
Historigram
use *;
use Rng;
let mut rng = thread_rng;
let values: = .map.collect;
let mut plot = default;
plot.set_domain
.set_codomain
.set_title
.set_x_label
.set_y_label
.set_size
.add_plot;
println!;
Output of the previous example:
Composing multiple plots
It is also possible to compose multiple plots:
use *;
use Rng;
let mut rng = thread_rng;
let values: = .map.collect;
let mut plot = default;
plot.set_domain
.set_codomain
.set_title
.set_x_label
.set_y_label
.set_size
.add_plot
.add_plot;
println!;
Output of the previous example:
License
MIT - Enjoy!