Loading ...
Sorry, an error occurred while loading the content.

More on using datetime format

Expand Messages
  • George Hansper
    Hi Steve, I ve found ploticus quite useful, but the date-time handling is frustrating at times. There are quite a few input and output formats, but it would be
    Message 1 of 1 , Jun 3, 2007
    • 0 Attachment
      Hi Steve,

      I've found ploticus quite useful, but the date-time handling
      is frustrating at times.

      There are quite a few input and output formats, but it would be
      much easier if users could just "roll there own", eg:

      xstubfmt="hhh hours" -> 100 hours
      xstubfmt="dd Mmm hhA" -> 21 May 11am

      Currently:

      xstubfmt=dd.hhA -> 01.0AM
      xstubfmt="dd hhA" -> y3$@% (some rubbish, no messages)

      There was no error or warning that the date/time format was
      incorrect.

      Overall, ploticus would benefit from more informative error messages.

      Are there any plans to overhaul the date-time handling, both
      on the input and output sides?

      I frequently plot data based on log-file output, and it's difficult
      to ensure that the date-time values do not span date-boundaries or
      other boundaries which might be sensible for that case. Ideally,
      ploticus would cope with all such cases smoothly.

      Unlike other people, I am not prepared to change to gnuplot, because
      ploticus is better documented and easier to use, in general.
      I'd rather iron out the bumps in ploticus.

      I will echo Chunling's view that being able to handle millisecond
      and microsecond resolution on time-stamps is useful.

      Regards,
      George Hansper

      PS: I noticed a problem with the date-time input

      If the last data-point is between 23:59:30 and 23:25:59, the
      last day is not rendered correctly. In this example, the
      graph is truncated at the start of the last day.
      In my real-life cases, the last day is truncated around 6:00am

      #!/bin/bash
      X_LABEL=day/month
      DATE=01
      MONTH=05
      pl -prefab chron -o stdout -cm data=- -pagesize 20,11 \
      rectangle="2 2 20 10" \
      mode=line \
      x=1 y=2 \
      unittype=datetime \
      datefmt=yyyy-mm-dd \
      xstubfmt="dd hhA" \
      xgrid=yes \
      ygrid=yes \
      ylbl="Mbytes" \
      xlbl="day/month" \
      autow=no <<EOF
      2007-${MONTH}-${DATE}.00:00:00 2
      2007-${MONTH}-${DATE}.23:59:59 2
      2007-${MONTH}-$(($DATE+1)).00:00:00 5
      2007-${MONTH}-$(($DATE+1)).23:59:59 5
      2007-${MONTH}-$(($DATE+2)).00:00:00 3
      2007-${MONTH}-$(($DATE+2)).23:00:00 3
      2007-${MONTH}-$(($DATE+2)).23:59:29 3
      2007-${MONTH}-$(($DATE+2)).23:59:30 3
      EOF
    Your message has been successfully submitted and would be delivered to recipients shortly.