From 5901f1007aa60bcd5e8b8850283d045f3c79b24b Mon Sep 17 00:00:00 2001 From: Rahix Date: Sat, 14 Sep 2024 21:39:36 +0200 Subject: [PATCH] Add gnuplot script for plotting pressure curves --- logs/README.md | 8 ++++++++ logs/plot-pressure.gnuplot | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 logs/plot-pressure.gnuplot diff --git a/logs/README.md b/logs/README.md index 6f9d000..8f4f4b9 100644 --- a/logs/README.md +++ b/logs/README.md @@ -15,3 +15,11 @@ Pumpdown curve: elapsed (seconds, float) and mbar. To acquire: `python3 acquire.py` and give it a tag/comment to stdin. Then press the pumpdown button or turn the scope on. Elapsed is 0 at the moment the script detected a pumpdown event. + +## Plotting with `gnuplot` +You can use the `plot-pressure.gnuplot` script to plot the pressure graphs. Use it like this: + +```terminal +$ gnuplot +gnuplot> load "plot-pressure.gnuplot" +``` diff --git a/logs/plot-pressure.gnuplot b/logs/plot-pressure.gnuplot new file mode 100644 index 0000000..f7cf8c7 --- /dev/null +++ b/logs/plot-pressure.gnuplot @@ -0,0 +1,6 @@ +FILES = system("ls -1 pressure-*.csv") +LABEL = system("ls -1 pressure-*.csv | sed 's/pressure-\\(.*\\)\\..*/\\1/'") + +set logscale y + +plot for [i=1:words(FILES)] word(FILES,i) using 1:2 title word(LABEL,i) with lines