gnuplot: subtitle with smaller fontsize

旧街凉风 提交于 2019-12-20 19:36:16

问题


Does somebody know how you can insert a subtitle with a smaller fontsize in gnuplot?

Currently, the way I create a subtitle is by using \n in the title. Additionally, I would like the subtitle to have a smaller fontsize.

Thanks in advance.


回答1:


This works for the postscript terminal at least (for some reason x11 didn't want to scale my font. Perhaps it is a bug...):

set term <whatever> enhanced
set output "<whatever.ext>"
set title "Big Title\n{/*0.5 subtitle}"

The {/*0.5} scales the fontsize to be half of the current active fontsize. You can also specify fontsizes explicitly:

set title "{/=20 Big} Medium {/=5 Small}"

Or you can change the font for a region of text:

set title "{/Helvetica foo} {/Symbol G}"

These forms can be combined to change the font and size in a particular region of text as well:

set title "This is a big gamma {/Symbol=20 G}"

For more information about enhanced text, see help enhanced.




回答2:


You can use label. You have to experiment a bit with its proper placement by at:

set title "Big Title"
set label "Subtitle" at screen 0.5, 0.9 font "Arial,8"
plot sin(x)


来源:https://stackoverflow.com/questions/13643583/gnuplot-subtitle-with-smaller-fontsize

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