Time gnuplot中x轴的日期和时间格式

Time gnuplot中x轴的日期和时间格式,time,gnuplot,Time,Gnuplot,我有一个csv文件,看起来像: 2014年6月27日星期五23:22:17 3500,星期六2014年6月28日09:21:55 我想将第1列绘制为y,第2列绘制为x: set datafile separator "," set xdata time set timefmt "%a %b %d %T %Y" set format x "%d-%b\n%H:%M" plot "file.csv" u 2:1 对于

我有一个csv文件,看起来像:

2014年6月27日星期五23:22:17

3500,星期六2014年6月28日09:21:55

我想将第1列绘制为y,第2列绘制为x:

set datafile separator ","
set xdata time
set timefmt "%a %b %d %T %Y"
set format x "%d-%b\n%H:%M"
plot "file.csv" u 2:1
对于每一行,我都会得到一个错误:

warning: Bad time format in string
warning: Bad abbreviated month name
warning: Skipping data file with no valid points
在x范围的末尾是无效的

我真的不知道发生了什么事。我的时间格式看起来不错。对吗?
谢谢

Gnuplot不支持
timemt
中的
%a
%T
说明符(但是,它们可以在
set format x
中使用)-请参见第页。第168页

虽然
%T
可以直接替换为
%H:%M:%S
%a
似乎有点问题。一种解决方法是对文件进行预处理,以去除第二列中的日期名称,例如

set xdata time
set timefmt "%b %d %H:%M:%S %Y"
set format x "%d-%b\n%H:%M"
plot "<(gawk -F, '{print $1, substr($2, 5)}' file.csv)" u 2:1
设置扩展数据时间
设置时间“%b%d%H:%M:%S%Y”
设置格式x“%d-%b\n%H:%M”

绘图“确定。我必须从文件中删除“Fri”或“Sat”字(使用vim很容易).我得到了警告
错误的缩写月份名称
和绘图:)Thanks@murpholinox因此,
错误的缩写月名
错误仍然存在?这可能表明文件中的缩写使用的语言与系统区域设置不兼容-可能是
设置区域设置““
在Gnuplot脚本的开头可能会有帮助。。。