gnuplot error: Bad format character

纵饮孤独 提交于 2019-12-19 10:11:40

问题


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


回答1:


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.




回答2:


You have used two types of quotation mark:

“...” and "..."

I guess it's a problem.




回答3:


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.



来源:https://stackoverflow.com/questions/9342483/gnuplot-error-bad-format-character

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!