Module dataplotlib::util [] [src]

util just provides a couple of utility functions to make life easier.

Functions

linspace

linspace allows eases the creation a Vec of values to use as the x values on a plot. Once that is done, it is straightforward to map some function over that Vec to get the y values.

zip2

zip2 will combine two Vec<T> into a single Vec<(T, T)> with a length equal to the length of the shorter input Vec. Rust has a built in zip function, but it has a signature that yields Vec<(&T, &T)> which is undesirable.