term_graph 0.1.0

A library to graph functions in the command line. For a tutorial on getting started, check out the CaspianA1/term-graph repository on Github.
Documentation
  • Coverage
  • 0%
    0 out of 13 items documented0 out of 6 items with examples
  • Size
  • Source code size: 5.69 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 369.47 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • CaspianA1/term-graph
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CaspianA1

Graph Rust closures in the terminal.

  • Note: the closures used are floating-point.

Here's an example of how to use term-graph:

use term_graph::*;

fn main() {
  let screen = init_screen();
  let graph_spot = make_plot_area(&screen, GraphPlacement::_TopMiddle);
  let graph_spot_2 = make_plot_area(&screen, GraphPlacement::_TopRight);

  let small_wave = |theta: f32| 8.0 * theta.sin();
  let big_wave = |theta: f32| 17.0 * theta.tan() + 17.0 * theta.atan();

  draw_function(graph_spot, small_wave);
  draw_function(graph_spot_2, big_wave);

  screen.deinit();
}

Here's what that looks like:

ASCII-graph