Do you know how to show the character '@' in the title when using gnuplot and the output format is PNG image? Thanks,
Asked
Active
Viewed 2,982 times
3
-
Can you post an example script that causes this problem? What kind of error/odd behavior do you see? – andyras Oct 30 '12 at 18:38
-
Does it work if you try different fonts? Perhaps you need to set `GDFONTPATH` and use a proper font. -- Also, what happens if you try the `pngcairo` terminal? If you have it installed, I find that it produces better output than the old png-gd version. – mgilson Oct 30 '12 at 18:48
-
set term png enhanced size 1280,1024. It seems the 'enhanced' is the problem. After remove it, it works fine. Thanks. – Peilin Yang Oct 30 '12 at 21:18
1 Answers
2
Which version of gnuplot are you using? Using gnuplot 4.4.3 with the following script:
#!/usr/bin/gnuplot
set term png
set output 'plot@.png'
set xlabel 'xlabel is @'
set ylabel 'ylabel is @'
set title "title is @a\'\@\'a\@"
plot x t 'line title is @'
gives me this image:
Even playing with escape sequence characters doesn't seem to pose a problem, and the file created has an '@' in the filename.

andyras
- 15,542
- 6
- 55
- 77
-
Thanks andyras. I found where is the problem. Maybe 'enhanced' terminal cause the problem. – Peilin Yang Oct 30 '12 at 21:19
-
@PeilinYang -- `enhanced` does cause a problem with `'@'` (`@` creates a "phantom box". See `help enhanced` for details). If you're using enhanced text, then you need to escape your `'@'` -- e.g. `'\@'` – mgilson Oct 31 '12 at 15:36