• Change time scale yaxis

    From scandari@21:1/5 to All on Mon Sep 26 13:22:39 2022
    Hello, I'm new to gnuplot. Want to obtain this sort of plot: https://i.stack.imgur.com/VV4Ex.png
    This is my code but I can't change y scale :(
    ----------
    $TIMES << EOT
    2019-01-08 00:14
    2019-05-08 03:14
    2019-05-07 22:08
    2019-08-07 22:08
    EOT

    set xtics time format "%m/%d"
    set ytics time format "%H:%M"
    set xlabel "Date (mm/dd)" font "Times, 12"
    set ylabel "Time Of Day(hh:mm)" font "Times, 12"
    set key tmargin reverse Left

    set xrange [strptime("%Y-%m-%d","2019-01-01"):strptime("%Y-%m-%d","2019-10-30")]

    plot $TIMES using (timecolumn(1,"%Y-%m-%d")) : (timecolumn(2,"%H:%M")) with points
    -----------
    Do you have suggestions? Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Karl Ratzsch@21:1/5 to All on Wed Oct 5 10:04:54 2022
    Am 26.09.2022 um 22:22 schrieb scandari:
    Hello, I'm new to gnuplot. Want to obtain this sort of plot: https://i.stack.imgur.com/VV4Ex.png
    This is my code but I can't change y scale :(
    ----------
    $TIMES << EOT
    2019-01-08 00:14
    2019-05-08 03:14
    2019-05-07 22:08
    2019-08-07 22:08
    EOT

    set xtics time format "%m/%d"
    set ytics time format "%H:%M"
    set xlabel "Date (mm/dd)" font "Times, 12"
    set ylabel "Time Of Day(hh:mm)" font "Times, 12"
    set key tmargin reverse Left

    set xrange [strptime("%Y-%m-%d","2019-01-01"):strptime("%Y-%m-%d","2019-10-30")]

    plot $TIMES using (timecolumn(1,"%Y-%m-%d")) : (timecolumn(2,"%H:%M")) with points
    -----------
    Do you have suggestions? Thanks.

    Hope there is no typo in the below:

    wrap(x) = (x>12 ? x-24 : x)

    set yrange [-13*3600:13*3600]
    set ytics (-12 "noon", -6 "6pm", 0 "midnight", 6 "6am", 12 "noon")

    plot $TIMES using (timecolumn(1,"%Y-%m-%d")) :
    (wrap(timecolumn(2,"%H:%M"))) with points, 0 dt 2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)