gnuplot标题和轴标签减少一半 [英] gnuplot Title and Axis labels are cut of by half

查看:99
本文介绍了gnuplot标题和轴标签减少一半的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已将图形"标题的字体大小以及x和y轴标签更改为双倍大小.现在,标题和轴标签更大了,但它们被切成两半并延伸到图形本身中.

Ive changed the font size of the Graph title and the x and y axis label to the double size. Now the title and axis labels are much bigger but they are cut of by half and reach into the graph itself.

是否可以设置标题的页边距,以使它们完整显示而不会进入图形?

Is there an option to set a margin for the title so they are plotted complete and without reaching into the graph?

//Im使用gnuplot 4.6补丁级别0

// Im using gnuplot 4.6 patchlevel 0

推荐答案

标签位置和边距是根据总终端字体大小计算的,可以使用set terminalset termoption font ',20'设置.

The label position and the margins are calculated based on the overall terminal font size, which can be set with set terminal or set termoption font ',20'.

因此,如果您在本地增加字体大小(仅用于标题和轴标签),则页边距和标签位置是错误的.

So if you increase the font size locally (only for the title and axes labels), the margins and the label positions are wrong.

您可以设置显式边距,例如set lmargin 5,它保留对应于5个字符宽度的左侧边距,甚至保留绝对边距,例如. set lmargin at screen 0.1.对于titlexlabel,有一个offset选项,该选项允许相对于默认位置调整标签位置.

You can set explicit margins like set lmargin 5, which reserves a left margin corresponding to 5 character widths, or even absolute margins with e.g. set lmargin at screen 0.1. For title and xlabel there is an offset option, which allows to adjust the label position relative to the default position.

set terminal pngcairo size 600,400 font ',10'
set output 'output.png'
set xlabel 'xlabel' font ',30' offset 0,-1
set bmargin 5
plot sin(x)

这篇关于gnuplot标题和轴标签减少一半的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆