All Projects → fabianboesiger → debug-plotter

fabianboesiger / debug-plotter

Licence: other
Rust crate that provides a convenient macro to quickly plot variables.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to debug-plotter

AutoIt-Obfuscator
AutoIt Obfuscator lets you protect AutoIt script source code against analysis, reverse engineering & decompilation using advanced obfuscation techniques and polymorphic encryption.
Stars: ✭ 31 (-62.2%)
Mutual labels:  debugging
netlogs
Web extension for debugging your API
Stars: ✭ 16 (-80.49%)
Mutual labels:  debugging
DbgPkg
Scripts to prepare Windows system for debugging.
Stars: ✭ 30 (-63.41%)
Mutual labels:  debugging
iopipe-js
Build and run serverless apps with confidence on AWS Lambda with Tracing, Profiling, Metrics, Monitoring, and more.
Stars: ✭ 33 (-59.76%)
Mutual labels:  debugging
SQLCallStackResolver
Utility to resolve SQL Server callstacks to their correct symbolic form using just PDBs and without a dump file
Stars: ✭ 55 (-32.93%)
Mutual labels:  debugging
2021-bordeaux-dataviz
Scientific Visualization Crash Course (Python & Matplotlib)
Stars: ✭ 20 (-75.61%)
Mutual labels:  plotting
restorepoint
Debugging in R with restore points
Stars: ✭ 15 (-81.71%)
Mutual labels:  debugging
EVM-Simulator
EVM-Simulator bachelor's thesis.
Stars: ✭ 36 (-56.1%)
Mutual labels:  debugging
ember-template-inspector
An ember add-on which opens the template file in the code editor while inspecting an element.
Stars: ✭ 15 (-81.71%)
Mutual labels:  debugging
ghc-stack
Hacking GHC's Stack for Fun and Profit (featuring The Glorious Haskell Debugger v0.0.1 Pre-alpha)
Stars: ✭ 69 (-15.85%)
Mutual labels:  debugging
debugging-async-operations-in-nodejs
Example code to accompany my blog post on debugging async operations in Node.js.
Stars: ✭ 22 (-73.17%)
Mutual labels:  debugging
charter
DSL and C Library to generate SVG Plot
Stars: ✭ 39 (-52.44%)
Mutual labels:  plotting
debuggingbook
Project page for "The Debugging Book"
Stars: ✭ 132 (+60.98%)
Mutual labels:  debugging
gdbundle
Minimalist plugin manager for GDB and LLDB
Stars: ✭ 72 (-12.2%)
Mutual labels:  debugging
Displaz.jl
Julia bindings for the displaz lidar viewer
Stars: ✭ 16 (-80.49%)
Mutual labels:  plotting
Interactive Data Editor
A Software to interactively edit data in a graphical manner
Stars: ✭ 35 (-57.32%)
Mutual labels:  plotting
cpplot
Interactive graphs and charts for C++, viewable in-browser
Stars: ✭ 73 (-10.98%)
Mutual labels:  plotting
krumo
Krumo: Structured information display solution for PHP
Stars: ✭ 74 (-9.76%)
Mutual labels:  debugging
hs-probe-firmware
A CMSIS-DAP implementation in pure Rust.
Stars: ✭ 68 (-17.07%)
Mutual labels:  debugging
coc-java-debug
An extension for coc.nvim to enable Java debugging via jdt.ls
Stars: ✭ 92 (+12.2%)
Mutual labels:  debugging

Debug Plotter

This crate provides a convenient macro to quickly plot variables.

Documentation

For more information on how to use this crate, please take a look at the documentation or the examples.

Usage

An Example

In this example, we quickly want to plot the variables a, b, and c. Optionally, we can name the plot. Plots are saved as a PNG image in the plots directory that is created in the working directory.

fn main() {
    for a in 0usize..10usize {
        let b = (a as f32 / 2.0).sin() * 10.0;
        let c = 5 - (a as i32);

        debug_plotter::plot!(a, b, c where caption = "My Plot");
    }
}

The example above generates a plot named "My Plot" and saves it to 'plots/My_Plot.png`.

Basic PLot

Additional Use Cases

The macro takes a list of variables. By default, the value of the variable is mapped to the y axis, and the x axis shows the iteration number.

debug_plotter::plot!(a, b, c);

It is possible to pass a tuple if you want the x axis to be another value instead of the iteration number.

debug_plotter::plot!((x, a), (x, b), (x, c));

It is also possible to rename variables in the legend using the keyword as.

debug_plotter::plot!(a as "Alice", b as "Bob", c as "Charlie");

It is possible to provide additional options for the plot after a where keyword.

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 or window.
x_desc "x description" Sets the description of the x axis.
y_desc "y description" Sets the description of the y axis.
path "/plots/my_plot.jpg" Defines where the plot is saved.
x_range 0f64..100f64 Defines start and end of the x axis.
y_range 0f64..100f64 Defines start and end of the y axis.
values 1000usize Defines the maximal number of values that are stored. If the macro is called more times than this number, the oldest value is dropped.
live true Enables live mode which opens the plot in a window with live updates. Requires feature live, which is enabled by default.

Debug and Release Mode

The plot! macro generates plots in debug and release mode. If you want to avoid generating plots in release mode, use debug_plot! instead.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].