Gnuplot cheatsheet
Gnuplot
Good manual: hirophysics
Data
Data format is TSV
Commands
Plot 1st and 3rd columns:
plot "file.tsv" u 1:3 w linespoints
Don’t hide the window instantly when running a script: end the file with:
pause mouse close
Alternatively run gnuplot with --persist
argument
Use dates on X axis:
set timefmt "%Y-%m-%d"
set xdata time
Grid:
set grid
Tics:
set ytics 100
Process input with a script:
plot "< tail +20 input.tsv"
# ^ shell command here
Example:
set timefmt "%Y-%m-%d"
set xdata time
set autoscale y
set tics
set grid # mxtics mytics
set ytics 100
plot "< tail +20 data.tsv" u 1:3 w linespoints smooth bezier
pause mouse close