#plot #python #csv #utility

make-csv

Simple macro's that make writing csv files for plotting purposes easy

1 unstable release

0.1.0 Oct 29, 2023

#331 in Visualization

GPL-3.0-or-later

14KB

Make-Csv

This is just a very simple crate which implements four macro rules which can be helpful for creating .csv files and plottin them using Python.

Usage

use make_csv::{csv_start, csv_entry, csv_stop, python};

// create csv writer for file "data.csv"
let mut wtr = csv_start!("data.csv");

// add header and one data row
csv_entry!(wtr <- "header_0", "header_1");
csv_entry!(wtr <- 0.0, 1.0);

// flush the writer
csv_stop!(wtr);

// use python script to plot the data
python!("plot.py", "data.scv");

Dependencies

~1.2–1.6MB
~19K SLoC