some SMA functions for gnuplot (soon to be deprecated)