Set axis label marks in gnuplot

My gnuplot login looks something like this:

1:00am  1       10
1:00am  30      12
1:01am  60      18
1:01am  90      20
1:02am  120     21
...

The first column contains (what I would like) the X axis labels, and the second column contains the X axis values. (Actually, I have one row per second, so many rows have “1:00 in the morning”, like in the column tags, then “1:01 AM”, etc.).

I can build the values ​​that interest me using something like:

gnuplot> plot "my_data.txt" using 2:3 with lines

And I can set the X axis to a check mark (and label) every 30 minutes (which is 30 * 60 = 1800 seconds), but the label used is the value of the X axis (something like 3600 for one hour).

, , - , , . , gnuplot. , , , .

Edit:

, xticlabels() plot. , , -, xxt ( ), , set xtics.

:

gnuplot . :

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

, X ( ) .

set xtics 3600

X, .

+3
1

, , , set timefmt ... ; set xdata time. %s, .

+2

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


All Articles