gnuplot - gnuplot - 将 x 轴上的 unix 时间戳格式化为日期 - 时间
问题描述
我有以下格式的数据:
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 应该是从第一列以某种预定义格式的相应时间。
解决方案
推荐阅读
- javascript - javascript计算器上的退格按钮不起作用
- python - 无法安装 virtualenv (python) (windows)
- php - HTML 按钮未选择正确的表单值
- django - 正在运行的 Django 2 调度程序
- python - 为什么我在使用 pip WARNING: Ignoring invalid distribution -ip 时会得到这个?
- ruby-on-rails - 无法在 Ubuntu 20.04 上为 Ruby 版本 2.5.3 安装 json 版本 1.8.2 gem
- android - How to get date from SqLite Database in android where the date=date picker
- xaml - I can't change the color of text on the Xamarin Forms Shell
- corda - 如何在 Corda 中指定终端仿真器
- javascript - React Component not returning simple console log properly