我有以下格式的数据:
1609257628 2
1609256682 4
1609255914 1
其中第一列应该在 x 轴上并且是 unix 时间戳。有什么方法可以生成一个可读的日期,例如格式“%d.%m.%Y %H:%M”,同时保持数据点在 x 轴上的等距?
我试过了:
set format x "%d.%m.%Y %H:%M"
plot data u 0:2:xticlabels(1) w l t
但它什么都不做,只是绘制时间戳。所以我尝试更简单:
set format x "%d.%m.%Y %H:%M"
plot data u 1:2 w l
但是我明白
Bad format character
无论如何,目标是获得 plot using 0:2
,但同时,x tic 应该是某种预定义格式的第一列的相应时间。