如何在 gnuplot 中的符号上加点?
How to get a dot over a symbol in gnuplot?
我正在尝试在 gnuplot 中创建一个图,在图例中的符号 theta 上加点。
我想做一些类似于乳胶的 \dot{\theta} 和 \ddot{\theta} 的事情。但是,大多数帖子要求使用 'set term latex' 或 'set term epslatex' 来输出 .tex 文件。我需要将输出保留为 pdf,并在图例中的 theta 上加上点和双点。这可能吗?感谢任何帮助。谢谢!
代替 'Pitch rate',我需要上面有一个点的符号 theta。
代替 'Pitch acceleration',我需要上面有两个点的符号 theta。
set term pdf
set termopt enhanced
set encoding utf8
set output "rampfuncs.pdf"
set style func linespoints
set xlabel 'time'
set format y "%.2f"
plot "output.dat" using 1:2 title '{/Symbol q} - Pitch angle', \
"output.dat" using 1:3 title 'Pitch rate', \
"output.dat" using 1:4 title 'Pitch acceleration'
set term x11
meuh回答后更新:图片供参考
meuh 评论后的第二次更新:图片 2
这在 gnuplot 指南的 增强文本模式 部分中有描述。您可以使用 ~
波浪字符叠印两个项目,例如 ~a/
将叠印 a
和 /
。在您的情况下,您需要将点字符提高字体大小的 1.1 倍(凭经验发现),以便它出现在 a
上方,因此您在字符前面加上这个数字,并将其括在大括号中以使其成为一项:~a{1.1.}
plot "data" using 1:2 title '{/Symbol q} angle', \
"data" using 1:3 title '~{/Symbol q}{1.1.} rate', \
"data" using 1:4 title '~{/Symbol q}{1.1..} accel'
结果如下:
似乎存在一个错误,如果 ~{}{}
结构位于标题的末尾,标题将无法正确显示。简单的解决方法是在标题 ~{}{}
.
的末尾添加一个额外的 space
我正在尝试在 gnuplot 中创建一个图,在图例中的符号 theta 上加点。
我想做一些类似于乳胶的 \dot{\theta} 和 \ddot{\theta} 的事情。但是,大多数帖子要求使用 'set term latex' 或 'set term epslatex' 来输出 .tex 文件。我需要将输出保留为 pdf,并在图例中的 theta 上加上点和双点。这可能吗?感谢任何帮助。谢谢!
代替 'Pitch rate',我需要上面有一个点的符号 theta。 代替 'Pitch acceleration',我需要上面有两个点的符号 theta。
set term pdf
set termopt enhanced
set encoding utf8
set output "rampfuncs.pdf"
set style func linespoints
set xlabel 'time'
set format y "%.2f"
plot "output.dat" using 1:2 title '{/Symbol q} - Pitch angle', \
"output.dat" using 1:3 title 'Pitch rate', \
"output.dat" using 1:4 title 'Pitch acceleration'
set term x11
meuh回答后更新:图片供参考
meuh 评论后的第二次更新:图片 2
这在 gnuplot 指南的 增强文本模式 部分中有描述。您可以使用 ~
波浪字符叠印两个项目,例如 ~a/
将叠印 a
和 /
。在您的情况下,您需要将点字符提高字体大小的 1.1 倍(凭经验发现),以便它出现在 a
上方,因此您在字符前面加上这个数字,并将其括在大括号中以使其成为一项:~a{1.1.}
plot "data" using 1:2 title '{/Symbol q} angle', \
"data" using 1:3 title '~{/Symbol q}{1.1.} rate', \
"data" using 1:4 title '~{/Symbol q}{1.1..} accel'
结果如下:
似乎存在一个错误,如果 ~{}{}
结构位于标题的末尾,标题将无法正确显示。简单的解决方法是在标题 ~{}{}
.