Generating plots with GNUplot and sending them via mail

December 2009


  1. Installing packages

    sudo apt-get install gnuplot metamail

  2. Formatting date/times for GNUplot

    GNUplot reads HH:MM as well as seconds-since-the-epoch. The latter can be obtained like this:

    date --date='2009-12-13 19:35' +%s

  3. Plotting using GNUplot

    #!/usr/bin/gnuplot
    
    set term gif
    set output "SimSpeed.gif"
    plot "SimSpeed.txt"
    quit
    	

  4. Sending with MetaMail

    metasend -b -s "Progress " -t me@home.com -m application/x-gzip -f tarbundle.tgz