Origonal Author: https://bitbucket.org/lucashnegri/lua-gnuplot