首页 > 解决方案 > 在gnuplot epslatex中插入度数符号

问题描述

嗨,我正在使用 gnuplot epslatex 终端来获取我的绘图。我需要一个度数符号,为此我使用了"{/Symbol \260}". 我的序言如下

set terminal epslatex standalone newstyle color dashed size 5in,3.5in 但以错误告终。有什么建议么

 Package inputenc Error: Invalid UTF-8 byte "B0.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.169     \gplfronttext
                       
? H
The document does not appear to be in UTF-8 encoding.
Try adding \UseRawInputEncoding as the first line of the file
or specify an encoding such as \usepackage [latin1]{inputenc}
in the document preamble.
Alternatively, save the file in UTF-8 using your editor or another tool

我知道帮助提供了一堆命令来解决这个问题。但我不知道在哪里粘贴这个。我应该在我的脚本本身还是其他任何地方这样做?

GNUPLOT Version 5.2 patchlevel 8

让我知道是否需要提供任何进一步的信息

标签: gnuplotdegrees

解决方案


所有 gnuplot 的基于 LaTeX 的终端都使用 LaTeX 进行文本处理,因此任何标记或特殊符号都必须用乳胶表示,而不是 gnuplot 自己的标记语言。另一方面,您的输出显示您的乳胶配置已准备好处理 UTF8 字符,因此不需要特殊符号或标记。因此,Gnuplot 的原生文本处理和 Latex 都应该处理 utf8 中的度数符号。

例如,要向 y 轴格式添加度数符号:

 set ytics format "%.2f°"

一般来说,对于乳胶数值输出,你会想告诉乳胶使用数学模式:

 set ytics format "$%.2f°$"

推荐阅读