gpt4 book ai didi

python - 什么取代了 text.latex.unicode?

转载 作者:太空宇宙 更新时间:2023-11-03 15:39:59 24 4
gpt4 key购买 nike

在我的 matplotlibrc 中,我使用了 text.latex.unicode rcparam,如文档(仍然)推荐的那样:

#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.unicode rcparam 的替代品?

不幸的是,我似乎无法接通 Matplotlib Tex Cookbook此刻。

最佳答案

api change notes告诉我们

Changes regarding the text.latex.unicode rcParam
The rcParam now defaults to True and is deprecated (i.e., in future versions of Maplotlib, unicode input will always be supported).
Moreover, the underlying implementation now uses \usepackage[utf8]{inputenc} instead of \usepackage{ucs}\usepackage[utf8x]{inputenc}.

这实质上意味着,如果您使用 matplotlib 2.2 或更高版本,则应该完全忽略该参数。

这也反射(reflect)在 the example of the current documentation 中没有使用此类参数的地方。

还有 current version of the rc file甚至没有这个参数。

关于python - 什么取代了 text.latex.unicode?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53157355/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com