Search code examples
dategnuplottitle

How to set the current date in the gnuplot title


It's possible to set the current date in the gnuplot title?

Something like...

set title "date of execution = datetime()"

Thanks in advance.

Alexandre.


Solution

  • Use strftime and time(0) to add a time/data to your title, e.g.:

    set title "data of execution ".strftime("%a %b %d %H:%M:%S %Y", time(0))
    

    Alternatively, if it doesn't have to be in the title you can also use

    set timestamp