Macro debug_plotter::plot [−][src]
macro_rules! plot {
($($variable : ident $(as $name : literal) ?), * $(,) ?
$(where $($key : ident = $value : expr), * $(,) ?) ?) => { ... };
}
Expand description
This macro is used to quickly generate plots for a list of variables.
All types that implement num_traits::cast::ToPrimitive
can be plotted.
The macro takes a list of variables.
debug_plotter::plot(a, b, c);
Optionally, you can provide a caption and other options for the plot after a semicolon. If no name is provided, the name defaults to the file and the line number of where the macro was called.
debug_plotter::plot(a, b, c where caption = "My Caption");
The following table lists all available options.
Identifier | Example Value | Description |
---|---|---|
caption | "caption" | Sets the caption of the plot. |
size | (400, 300) | Sets the size of the resulting image. |
x_desc | "x description" | Sets the description of the x axis. |
y_desc | "y description" | Sets the description of the y axis. |
When running in release mode, no plots are generated.
To disable compilation of dependencies in release mode,
pass --no-default-features
to this crate.