Gnuplot date/time in x axis

后端 未结 3 1304
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 22:51

I have a quick question regarding dates and times in x-axis in GNUPLOT. I\'ll let the code do the talking:

This is my data:

#Time   Data in Data out
         


        
3条回答
  •  孤街浪徒
    2020-12-07 23:16

    As far as I understood, the order of instructions is important, I could afford it using:

    • The timefmt is for data and has to be the same for xrange
    • format x is only for displaying

              set xdata time
              set timefmt "%Y%m%dT%H%M%S"
              set format x "%Y-%m-%d\n%H:%M:%S"
              # or with bash variables: set xrange ["$l_start_dt":"$l_end_dt"]
              set xrange ["20190620T000000":"20190628T000000"]
      

提交回复
热议问题