gnuplot - gnuplot 中的粗体增强文本

标签 gnuplot postscript

更新:此问题已在较新版本 (>5.0) 的 gnuplot 中解决;请参阅@andyras 的回答。

我很难让 gnuplot 在非 postscript 终端中创建带有粗体和增强文本的标签。下面的脚本

#!/usr/bin/env gnuplot

reset

set terminal pdfcairo enhanced color lw 3 size 3,2 font 'Arial-Bold'
set output 'output.pdf'

set tics scale 0

plot -x title 'normal text', \
-2*x t 'enhanced_{text}', \
-3*x t '{/Arial-Bold attempt to specify_{font}}'

set terminal pngcairo enhanced color lw 3 size 400,300 font 'Arial-Bold'
set output 'output.png'
replot

set terminal postscript enhanced color lw 3 size 6,4 font 'Arial-Bold'
set output 'output.eps'
replot

reset

生成以下 eps(使用 convert output.eps -rotate 90 outputeps.png 转换为 png):

enter image description here

这很好。但是,当我使用 pdf 或 png 终端时,结果如下所示:

enter image description here

请注意,虽然所有标签文本都应为粗体,但只有没有任何增强文本的标签为粗体。此外,当我尝试手动指定字体(最后一行标题)时,字体是不同的(恢复为默认值?)。

不使用 postscript 终端时我应该期待这种行为吗?是否有另一种指定字体的方法(即在 postscript 之外命名方案是否不同)?

最佳答案

从 5.0 版开始,gnuplot 有一个新的语法来处理这个问题:

 "normal text {/Times:Bold boldface-newfont} {/:Italic slanted-default-font } back to normal text"]

这些括号也可以嵌套。

关于gnuplot - gnuplot 中的粗体增强文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16428338/

相关文章:

colors - 如何在gnuplot中用可见光谱的颜色填充矩形?

variables - gnuplot - 获取拟合参数错误,获取拟合输出值作为变量,将变量打印到屏幕

gnuplot - 终端 png 中的\Sqrt{x} 增强

java - 如何将图像转换为 postscript 形状

python - 如何在 Python GUI 应用程序中显示 PostScript 文件

pdf - 将一个 pdf 或 ps 文件叠加在另一个文件之上

pdf - 在 pdf/postscript 中围绕一个圆圈放置超链接

perl - 无法获取 Perl Chart(gnuplot)来标记轴上的所有抽动

python - 绘制直方图 : How can I do it from scratch using data stored in a database?

c++ - Qt5 是否破坏了 QwtPlotRenderer postscript 支持?