ger*_*rit 5 python unicode matplotlib
在我的 中matplotlibrc,我正在使用text.latex.unicodercparam,正如文档(仍然)推荐的那样:
#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling
                            # unicode strings.
text.latex.unicode : True
但是从 Matplotlib 3.0 开始,我收到了 MatplotlibDeprecationWarning:
/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/envs/FCDR37a/lib/python3.7/site-packages/matplotlib/__init__.py:846: MatplotlibDeprecationWarning:
The text.latex.unicode rcparam was deprecated in Matplotlib 2.2 and will be removed in 3.1.
  "2.2", name=key, obj_type="rcparam", addendum=addendum)
/group_workspaces/cems2/fiduceo/Users/gholl/anaconda3/envs/FCDR37a/lib/python3.7/site-packages/matplotlib/__init__.py:846: MatplotlibDeprecationWarning:
The text.latex.unicode rcparam was deprecated in Matplotlib 2.2 and will be removed in 3.1.
  "2.2", name=key, obj_type="rcparam", addendum=addendum)
已弃用的text.latex.unicodercparam的替代品是什么?
不幸的是,我目前似乎无法访问Matplotlib Tex Cookbook。
该API变更笔记告诉我们
有关
text.latex.unicodercParam
的更改rcParam 现在默认为 True 并且已弃用(即,在 Maplotlib 的未来版本中,将始终支持 unicode 输入)。
此外,底层实现现在使用\usepackage[utf8]{inputenc}而不是\usepackage{ucs}\usepackage[utf8x]{inputenc}.
这实质上意味着如果您使用 matplotlib 2.2 或更高版本,您应该完全忽略该参数。
这也反映在当前文档的示例中,其中没有使用此类参数。
此外,当前版本的 rc 文件中甚至没有这个参数。