Gnuplot reads time data incorrectly

I cannot get gnuplot to build time data correctly. (I am using version 4.6, patchlevel 3.)

For MWE (well, non-working ...) input file

reset

set xdata time
set timefmt "%H:%M:%S"
set format x "%H:%M:%S"

plot '-' using ($1):($2) with lines lw 3
15:36:12  1.0
15:43:17  3.0
16:12:02  2.0
e

outputs the following result: enter image description here

Gnuplot seems to interpret the clock as seconds and ignore the rest. I tried a bunch of other formatting strings (also single / double quotes), but gnuplot seems to ignore everything except the first number.

Is something wrong with my format, or is it a mistake, or something else?

+4
source share
1 answer

$1 , gnuplot ( ). using 1:2:

reset
set xdata time
set timefmt "%H:%M:%S"
set format x "%H:%M:%S"

plot '-' using 1:2 with lines lw 3
15:36:12  1.0
15:43:17  3.0
16:12:02  2.0
e

$1 . $1 column(1), gnuplot stringcolumn(1) timecolumn(1) .

+3

Source: https://habr.com/ru/post/1673871/


All Articles