gnuplot 错误:格式字符错误

发布于 2025-01-07 01:18:35 字数 444 浏览 3 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

西瓜 2025-01-14 01:18:35

最近我在 xtics() 中遇到了同样的转义问题(“格式错误”)。

这应该可行:

set xtics ("random"  2, "sharing(0\%%)"  1, ...)

对我有帮助的是查看生成的 tex 文件。

Recently I had the same problem with escaping ("Bad format character") in xtics().

This should work:

set xtics ("random"  2, "sharing(0\%%)"  1, ...)

What helped me, was to look at the generated tex file.

江湖正好 2025-01-14 01:18:35

您使用了两种类型的引号:

“...” and "..."

我想这是一个问题。

You have used two types of quotation mark:

“...” and "..."

I guess it's a problem.

深白境迁sunset 2025-01-14 01:18:35

一个明显的问题是非 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.

满地尘埃落定 2025-01-14 01:18:35

双倍特殊字符 %
像这样 ”%%”

double the special character %
like this "%%"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文