macro_rules! plot {
([$prime:expr $(, $($fit:expr),+ $(,)? )? ], { $( $name:ident : $value:expr ),* $(,)? } $( , prefix = $prefix:expr )?) => { ... };
([$prime:expr $(, $($fit:expr),+ $(,)? )? ] $( , prefix = $prefix:expr )?) => { ... };
($prime:expr, { $( $name:ident : $value:expr ),* $(,)? } $( , prefix = $prefix:expr )?) => { ... };
($prime:expr$( , prefix = $prefix:expr )?) => { ... };
}Expand description
Plot a CurveFit, Polynomial or set of points to a PNG file.
Generates a filename based on the source file, line number, and timestamp.
- Creates the necessary directories if they don’t exist.
- Prints the path of the generated file to stdout.
- If prefix is specified, it is prepended to the filename.
§Examples
ⓘ
plot!(fit);
plot!([fit, poly1, poly2]);
plot!(fit, PlotOptions<_> { title: "My Plot", ..Default::default() });
plot!([fit, poly1], PlotOptions<_> { title: "My Plot", ..Default::default() }, prefix = "custom");