#!/bin/sh
# Bash script for gnuplot script, example usage: ./plotting3.sh data | gnuplot
# to plot the data in file "data" every second.
# Data example line: 2014-01-25 13:00:04 0.1727685188
# Dr. Rolf Freitag (rolf dot freitag at email dot de) 2014

echo reset
echo set grid
#echo set xlabel \"Date Time\"
echo set xdata time
echo set timefmt \"%Y-%m-%d %H:%M:%S\"
echo set format x \"%m-%d %H:%M\"
echo set xtics rotate by 90 offset 0,-4.5 out nomirror
echo set pointsize 0.25
while true; do
 # the first line is for plotting with small circle points
 #echo plot \"$1\" using 1:3 with lines notitle, \"$1\" using 1:3 with points pointtype 7 lt 1 ps 1 notitle
 # the second line is for plotting without points
 echo plot \"$1\" using 1:3 with lines notitle
 sleep 1
done
