gnuplot(七)、中英文字体

  • Post author:
  • Post category:其他



1、设置英文字体

set term post eps color enh solid font "Times New Roman,8"
set term post eps color enh solid font "Helvetica" 20
set term post eps color enh solid font "Arial" 10
font 'Times,19,Bold'


2、设置中文字体

(1)在 win10 的 C:\Windows\Fonts 目录下,找到 “宋体”(simsun.ttc)

(2)放在 ubuntu 的 /usr/common/fonts/ 目录下。

(3)在 gunplot 中加入 font  ‘/usr/common/fonts/simsun.ttc,14’ 命令

set term png font '/usr/common/fonts/simsun.ttc,14'              #改变字体
set out 'cn.png'
rep
set term pop
rep
!gthumb cn.png

为避免在 set term 中的 font 中要加入长路径,可设置环境变量。

打开 /home/xxx/.bashrc 文件,在最后添加                     #xxx 是用户名

export GDFONTPATH=”/usr/common/fonts/”



版权声明:本文为weixin_41565755原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。