问题
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