Skip to content

Instantly share code, notes, and snippets.

@sordina
Created September 22, 2015 03:11
Show Gist options
  • Save sordina/1f76d5b1a69266df58da to your computer and use it in GitHub Desktop.
Save sordina/1f76d5b1a69266df58da to your computer and use it in GitHub Desktop.
Plot a single column with gnuplot
#!/bin/bash
set -e
cat <<EOF > /tmp/gnuplot-column-script.gnuplot
set terminal png size 1600,800
set output "/tmp/gnuplot-column-$$.png"
unset key
set datafile separator " "
plot "<cat" using (column(0)):1 with lines notitle lw 4
EOF
cat | gnuplot /tmp/gnuplot-column-script.gnuplot
open /tmp/gnuplot-column-$$.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment