在 gnuplot epslatex 中插入度数符号

Inserting degree symbol in gnuplot epslatex

您好,我正在使用 gnuplot epslatex 终端获取绘图。我需要一个学位符号,为此我使用了 "{/Symbol 0}"。我的前言如下

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

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

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

例如在y轴格式上加一个度数符号:

 set ytics format "%.2f°"

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

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