Module four_bar::plot

source ·
Available on crate feature plot only.
Expand description

Plot utitlities.

Please see crate::plot2d::Figure and crate::plot3d::Figure for more information.

Single Plot Example

use four_bar::{plot::*, plot2d};

let fig = plot2d::Figure::new().add_line("", vec![[0.; 2], [1.; 2]], Style::Line, BLACK);
let mut buf = String::new();
let svg = SVGBackend::with_string(&mut buf, (1600, 1600));
fig.plot(svg).unwrap();

Sub-plots Example

use four_bar::{plot::*, plot2d};

let fig = plot2d::Figure::new().add_line("", vec![[0.; 2], [1.; 2]], Style::Line, BLACK);
let mut buf = String::new();
let svg = SVGBackend::with_string(&mut buf, (1600, 800));
let (root_l, root_r) = svg.into_drawing_area().split_horizontally(800);
fig.plot(root_l).unwrap();
fig.plot(root_r).unwrap();

Re-exports

Modules

  • The functions used to plot the 2D curve and synthesis result.
  • The functions used to plot the 3D curve and synthesis result.

Structs

Enums