Search code examples
gnuplot

Single digit month and day format specifier in Gnuplot 5.2


I am using Gnuplot 5.2 and would like to use single-digit months and days (1-12 and 1-31). There are different format specifiers for zero padded hours (%k, %H, %l, and %I), but there doesn't appear to be equivalents for months and days.

Is there a modified format specifier or workaround to get single-digit months or days?


Solution

  • Try this:

    Code:

    ### single digit day and month
    reset session
    
    set xrange [0:3600*24*60]
    set format x "%01d.%01m.%Y" time
    plot x
    
    ### end of code
    

    Result:

    enter image description here