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