admin管理员组文章数量:1435208
I am getting odd output when I make a graph and output it to a jpeg. The letters for the ylabel are all overlapping in a single space.
A minimal example is
set xlabel "THIS"
set ylabel "THAT"
f(x) = sin(x)
set terminal jpeg
set output "minimal-example.jpeg"
plot f(x)
This results in:Please note ylabel.
I am using gnuplot 6.0 under Ubuntu 24.10.
The ylabel looks fine in the default "to screen" output, and looks fine if I set the terminal to pdf. It persists with gif, jpeg, and png.
I am getting odd output when I make a graph and output it to a jpeg. The letters for the ylabel are all overlapping in a single space.
A minimal example is
set xlabel "THIS"
set ylabel "THAT"
f(x) = sin(x)
set terminal jpeg
set output "minimal-example.jpeg"
plot f(x)
This results in:Please note ylabel.
I am using gnuplot 6.0 under Ubuntu 24.10.
The ylabel looks fine in the default "to screen" output, and looks fine if I set the terminal to pdf. It persists with gif, jpeg, and png.
Share edited Mar 7 at 14:55 isherwood 61.2k16 gold badges121 silver badges170 bronze badges asked Mar 7 at 14:53 Edward BrothersEdward Brothers 11 bronze badge 2- Please don't tag your titles. See How to Ask and take the tour. – isherwood Commented Mar 7 at 14:56
- I have seen something similar here with earlier gnuplot versions, however, unfortunately can't find the post anymore. But I cannot reproduce this for any of gif, jpg, png on 6.0.0 and 6.0.2 on Windows 10. So, maybe something Linux specific with the graphics libraries? – theozh Commented Mar 7 at 15:26
1 Answer
Reset to default 0This is not a gnuplot error per se. It is a font-handling problem in the pango and harfbuzz system libraries due to major changes in how different types of fonts are rendered. The changes were made over several years in multiple versions of these libraries. I don't have a good solution other than trying to upgrade or downgrade all the libraries to a compatible set of versions. More information via the links below.
https://github/harfbuzz/harfbuzz/issues/2394#issuecomment-626254448
Overlapping letters in tics and labels gnuplot 5.4
Gnuplot PDF Terminal Exhibits Font Issues on Mac
本文标签: Overlapping Gnuplot ylabel letters in jpegGIFand png terminalsStack Overflow
版权声明:本文标题:Overlapping Gnuplot ylabel letters in jpeg, gif, and png terminals - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744922664a2632391.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论