GnuPlot 错误:“格式必须有 1-7 次 double 类型的转换”

use*_*297 2 ubuntu gnuplot

我不知道是什么导致了以下错误:

格式必须有 1-7 次 double 类型的转换。

我的输入文件格式正确。我使用以下命令:

使用 1:2“标题”绘制“input.txt”

全部在下图: 屏幕

Chr*_*oph 5

正确的语法是

plot "input.txt" using 1:2 title "title"
Run Code Online (Sandbox Code Playgroud)

如果您在using语句之后直接有一个字符串,那么这将被解释为格式说明符。从文档:

plot 'file' using <entry> {:<entry> {:<entry> ...}} {'format'}
Run Code Online (Sandbox Code Playgroud)

使用 的一些示例format是:

plot 'file' using 1:($2+$3) '%lf,%lf,%lf'
Run Code Online (Sandbox Code Playgroud)

或者

plot 'MyData' using "%*lf%lf%*20[^\n]%lf"
Run Code Online (Sandbox Code Playgroud)