python - What replaces text.latex.unicode?
问题描述
In my matplotlibrc
, I'm using the text.latex.unicode
rcparam, as (still) recommended by the documentation:
#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling
# unicode strings.
text.latex.unicode : True
But since Matplotlib 3.0, I am getting a 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)
What is the replacement for the deprecated text.latex.unicode
rcparam?
Unfortunately, I can't seem to reach the Matplotlib Tex Cookbook at the moment.
解决方案
api变更说明告诉我们
关于
text.latex.unicode
rcParam
的更改 rcParam 现在默认为 True 并且已被弃用(即,在 Maplotlib 的未来版本中,将始终支持 unicode 输入)。
此外,底层实现现在使用\usepackage[utf8]{inputenc}
而不是\usepackage{ucs}\usepackage[utf8x]{inputenc}
.
这实质上意味着如果您使用 matplotlib 2.2 或更高版本,您应该完全忽略该参数。
这也反映在当前文档的示例中,其中没有使用此类参数。
此外,当前版本的 rc 文件甚至没有这个参数。
推荐阅读
- r - 如何将基因的标题添加到 R 的输出中?
- javascript - 转换 JavaScript 数组中数据之间的关系
- javascript - React/Redux/Firebase createStore Config
- android - Android WebView 问题,请使用功能齐全的网络浏览器(例如 Google Chrome)访问此站点
- angular - 无法隐藏弹出箭头
- node.js - 文本文件中的内容将是文件名,如何获取并与新文件名进行比较(是否匹配)
- c# - 无法从程序集 System.Web 加载类型“System.Web.HttpPostedFileBase”
- c# - Physics.OverlapSphere() 返回的对撞机是否有特定顺序?
- typescript - 在受歧视的工会中没有多余的财产检查
- python - 在 Python 中聚合一个字典中的值以填充另一个字典