gnuplot 错误:格式字符错误
我是 gnuplot 新手,但迫切需要使用它。这是我使用的以下命令集:
set terminal latex
set output “conflict.tex”
set xtics ("random" 2, "sharing(0%)" 3, "sharing(10%)" 4, "sharing(25%)" 5, “sharing(50%)” 6, “stat” 7)
set ylabel “Conflict Percentage”
set xrange [0:9]
set yrange [0:60]
set xlabel “Traces”
set boxwidth 0.3
set style fill
plot 'D:\Utility Softwares\conflicts.dat' with boxes
之后我得到“格式字符错误”并且不知道为什么
感谢您的帮助
Am new to gnuplot but need o use it urgently. This is the following set of commands I used:
set terminal latex
set output “conflict.tex”
set xtics ("random" 2, "sharing(0%)" 3, "sharing(10%)" 4, "sharing(25%)" 5, “sharing(50%)” 6, “stat” 7)
set ylabel “Conflict Percentage”
set xrange [0:9]
set yrange [0:60]
set xlabel “Traces”
set boxwidth 0.3
set style fill
plot 'D:\Utility Softwares\conflicts.dat' with boxes
after which i get "Bad format character" and don't know why
Thanks for help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(4)
最近我在 xtics() 中遇到了同样的转义问题(“格式错误”)。
这应该可行:
对我有帮助的是查看生成的 tex 文件。
Recently I had the same problem with escaping ("Bad format character") in xtics().
This should work:
What helped me, was to look at the generated tex file.
您使用了两种类型的引号:
我想这是一个问题。
You have used two types of quotation mark:
I guess it's a problem.
一个明显的问题是非 ASCII 引号。将它们替换为
"
。下一个问题可能是
%
字符,因为它们是 LaTeX 的注释字符。可能需要使用反斜杠对它们进行转义:\%
。最后,您的数据文件可能有非标准分隔符,您可能需要设置
数据文件分隔符
。One obvious problem are the non-ASCII quotation marks. Replace them with
"
.The next problem might be the
%
characters, since those are comment characters for LaTeX. It might be necessary to escape them with a backslash:\%
.Finally, your data file could have a non-standard separator. You might need to set the
datafile separator
.双倍特殊字符 %
像这样 ”%%”
double the special character %
like this "%%"