Overlapping Gnuplot ylabel letters in jpeg, gif, and png terminals - Stack Overflow

I am getting odd output when I make a graph and output it to a jpeg.The letters for the ylabel are al

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
Add a comment  | 

1 Answer 1

Reset to default 0

This 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744922665a4601230.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信