plt
A plotting library with a focus on publication level aesthetics and ergonomic control.
Structure
- Plots are drawn on a
Subplot
. - One or more subplots are organized in a
Layout
. - The layout is added to a
Figure
, which is used to draw to a file or directly to aBackend
.
Use
To get started, see the examples directory in the main repository.
Example
use *;
// create data
let xs: = .map.collect;
let ys: = xs.iter.map.collect;
// create subplot
let mut sp = builder
.label
.label
.build;
// plot data
sp.plot.unwrap;
// make figure and add subplot
let mut fig = default;
fig.set_layout.unwrap;
// save figure to file
fig.draw_file.unwrap;
Dependencies
Currently, the only implemented backend depends on Cairo.
Debian / Ubuntu
apt install libcairo2-dev
Arch
pacman -Syu cairo